Skip to content
Snippets Groups Projects
Commit 3b063700 authored by Yandi's avatar Yandi
Browse files

modified create submission to make it work with job batches

parent fa6f083a
No related branches found
No related tags found
1 merge request!1Master into main
......@@ -30,7 +30,7 @@ def dummy_model(X):
# Divided by a magic number
return X[:, :, 4:].mean(dim=2) / 26 # This is (B, T)
def create_submission(model, transform, device):
def create_submission(model, transform, device, rootDir):
step_days = 10
batch_size = 1024
# We make chunks of num_days consecutive samples; As our dummy predictor
......@@ -57,7 +57,7 @@ def create_submission(model, transform, device):
num_days_test = test_loader.dataset.ntimes
logging.info("= Filling in the submission file")
with open("submission.csv", "w") as fh_submission:
with open(rootDir + "submission.csv", "w") as fh_submission:
fh_submission.write("Id,Predicted\n")
submission_offset = 0
......
No preview for this file type
No preview for this file type
......@@ -132,4 +132,4 @@ if __name__ == "__main__":
wandb.log({"val_loss": val_loss})
create_submission.create_submission(network, dataloader.composite_transform(dataloader.transform_remove_space_time(), dataloader.transform_min_max_scaling(MIN, MAX)), device)
create_submission.create_submission(network, dataloader.composite_transform(dataloader.transform_remove_space_time(), dataloader.transform_min_max_scaling(MIN, MAX)), device, rootDir)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment