diff --git a/create_submission.py b/create_submission.py index cdb5a0fbf12f17d5a97ecdcc00185077aff44bf3..2716653b4df04d1042f3d8b1950d222dfb9d37fc 100644 --- a/create_submission.py +++ b/create_submission.py @@ -37,7 +37,7 @@ def create_submission(model, transform, device): # is not using the temporal context, this is here arbitrarily chosen # However, note that it must be a divisor of the total number of days # in the 2017 year , either 1, 5, 73 or 365 - num_days = 365 + num_days = 73 num_workers = 7 use_cuda = torch.cuda.is_available() diff --git a/job.py b/job.py index 790df1970c68f82d11bb489ee9f4fc6f7d77ba51..e0cd03e3e88ce88945faf02ba7006c4decd775f2 100644 --- a/job.py +++ b/job.py @@ -75,7 +75,9 @@ parser.add_argument("--model_name", # Ensure the log directory exists os.system("mkdir -p logslurms") +args = parser.parse_args() + time_wall = {"no_limit": "48:00:00","hour" : "1:00:00", "half" : "0:00:00", "quarter" : "0:00:15"} # Launch the batch jobs -submit_job(makejob(commit_id, "cnn", 1, args.user, time_wall[args.time_wall])) \ No newline at end of file +submit_job(makejob(commit_id, args.model_name, 1, args.user, time_wall[args.time_wall])) \ No newline at end of file diff --git a/logs/RNN_9/best_model.pt b/logs/RNN_9/best_model.pt new file mode 100644 index 0000000000000000000000000000000000000000..e65e60cc2a9996d1c070bcace8d2b145d68eb7a8 Binary files /dev/null and b/logs/RNN_9/best_model.pt differ diff --git a/logs/main_unit_test.log b/logs/main_unit_test.log index 7bf04fdc39a43ab7c717cdaf77693855c2851a20..02f60cecbac808dd6b101ce8dc0288989f49c02d 100644 --- a/logs/main_unit_test.log +++ b/logs/main_unit_test.log @@ -943,3 +943,366 @@ INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx INFO:root: - The train fold has 36097 samples INFO:root: - The valid fold has 9047 samples +INFO:root:= Dataloaders for mean and standard deviation +INFO:root: - Dataset creation +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Generating the index +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - Loaded a dataset with 45144 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 45144 samples +INFO:root: - Subset dataset +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - The train fold has 36172 samples +INFO:root:= Dataloaders +INFO:root: - Dataset creation +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Generating the index +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - Loaded a dataset with 45144 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 45144 samples +INFO:root: - Subset dataset +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - The train fold has 36304 samples +INFO:root: - The valid fold has 8840 samples +INFO:root:= Dataloaders for mean and standard deviation +INFO:root: - Dataset creation +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Generating the index +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - Loaded a dataset with 45144 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 45144 samples +INFO:root: - Subset dataset +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - The train fold has 36173 samples +INFO:root:= Dataloaders +INFO:root: - Dataset creation +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Generating the index +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - Loaded a dataset with 45144 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 45144 samples +INFO:root: - Subset dataset +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - The train fold has 35937 samples +INFO:root: - The valid fold has 9207 samples +INFO:root:= Dataloaders for mean and standard deviation +INFO:root: - Dataset creation +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Generating the index +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - Loaded a dataset with 45144 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 45144 samples +INFO:root: - Subset dataset +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - The train fold has 36163 samples +INFO:root:= Dataloaders +INFO:root: - Dataset creation +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Generating the index +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - Loaded a dataset with 45144 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 45144 samples +INFO:root: - Subset dataset +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - The train fold has 36186 samples +INFO:root: - The valid fold has 8958 samples +INFO:root:= Dataloaders for mean and standard deviation +INFO:root: - Dataset creation +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Generating the index +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - Loaded a dataset with 45144 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 45144 samples +INFO:root: - Subset dataset +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - The train fold has 36232 samples +INFO:root:= Dataloaders +INFO:root: - Dataset creation +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Generating the index +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - Loaded a dataset with 45144 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 45144 samples +INFO:root: - Subset dataset +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - The train fold has 36137 samples +INFO:root: - The valid fold has 9007 samples +INFO:root:= Dataloaders for mean and standard deviation +INFO:root: - Dataset creation +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Generating the index +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - Loaded a dataset with 45144 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 45144 samples +INFO:root: - Subset dataset +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - The train fold has 36187 samples +INFO:root:= Dataloaders +INFO:root: - Dataset creation +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Generating the index +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - Loaded a dataset with 45144 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 45144 samples +INFO:root: - Subset dataset +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - The train fold has 36114 samples +INFO:root: - The valid fold has 9030 samples +INFO:root:= Dataloaders for mean and standard deviation +INFO:root: - Dataset creation +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Generating the index +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - Loaded a dataset with 45144 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 45144 samples +INFO:root: - Subset dataset +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - The train fold has 36068 samples +INFO:root:= Dataloaders +INFO:root: - Dataset creation +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Generating the index +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - Loaded a dataset with 45144 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 45144 samples +INFO:root: - Subset dataset +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - The train fold has 36081 samples +INFO:root: - The valid fold has 9063 samples +INFO:root:= Dataloaders for mean and standard deviation +INFO:root: - Dataset creation +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Generating the index +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - Loaded a dataset with 45144 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 45144 samples +INFO:root: - Subset dataset +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - The train fold has 35978 samples +INFO:root:= Dataloaders +INFO:root: - Dataset creation +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Generating the index +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - Loaded a dataset with 45144 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 45144 samples +INFO:root: - Subset dataset +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - The train fold has 36240 samples +INFO:root: - The valid fold has 8904 samples +INFO:root:= Dataloaders for mean and standard deviation +INFO:root: - Dataset creation +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Generating the index +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - Loaded a dataset with 45144 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 45144 samples +INFO:root: - Subset dataset +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - The train fold has 36126 samples +INFO:root:= Dataloaders +INFO:root: - Dataset creation +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Generating the index +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - Loaded a dataset with 45144 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 45144 samples +INFO:root: - Subset dataset +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - The train fold has 36102 samples +INFO:root: - The valid fold has 9042 samples +INFO:root:= Dataloaders for mean and standard deviation +INFO:root: - Dataset creation +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Generating the index +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - Loaded a dataset with 45144 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 45144 samples +INFO:root: - Subset dataset +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - The train fold has 36141 samples +INFO:root:= Dataloaders +INFO:root: - Dataset creation +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Generating the index +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - Loaded a dataset with 45144 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 45144 samples +INFO:root: - Subset dataset +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - The train fold has 36175 samples +INFO:root: - The valid fold has 8969 samples +INFO:root:= Dataloaders for mean and standard deviation +INFO:root: - Dataset creation +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Generating the index +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - Loaded a dataset with 45144 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 45144 samples +INFO:root: - Subset dataset +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - The train fold has 36208 samples +INFO:root:= Dataloaders +INFO:root: - Dataset creation +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Generating the index +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - Loaded a dataset with 45144 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 45144 samples +INFO:root: - Subset dataset +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - The train fold has 36066 samples +INFO:root: - The valid fold has 9078 samples +INFO:root:= Dataloaders for mean and standard deviation +INFO:root: - Dataset creation +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Generating the index +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - Loaded a dataset with 45144 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 45144 samples +INFO:root: - Subset dataset +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - The train fold has 36021 samples +INFO:root:= Dataloaders +INFO:root: - Dataset creation +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Generating the index +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - Loaded a dataset with 45144 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 45144 samples +INFO:root: - Subset dataset +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - The train fold has 36116 samples +INFO:root: - The valid fold has 9028 samples +INFO:root:= Dataloaders for mean and standard deviation +INFO:root: - Dataset creation +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Generating the index +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - Loaded a dataset with 45144 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 45144 samples +INFO:root: - Subset dataset +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - The train fold has 36234 samples +INFO:root:= Dataloaders +INFO:root: - Dataset creation +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Generating the index +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - Loaded a dataset with 45144 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 45144 samples +INFO:root: - Subset dataset +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - The train fold has 36174 samples +INFO:root: - The valid fold has 8970 samples +INFO:root:= Dataloaders for mean and standard deviation +INFO:root: - Dataset creation +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Generating the index +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - Loaded a dataset with 45144 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 45144 samples +INFO:root: - Subset dataset +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - The train fold has 36101 samples +INFO:root:= Dataloaders for mean and standard deviation +INFO:root: - Dataset creation +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Generating the index +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - Loaded a dataset with 45144 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 45144 samples +INFO:root: - Subset dataset +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - The train fold has 36128 samples +INFO:root:= Dataloaders +INFO:root: - Dataset creation +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Generating the index +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - Loaded a dataset with 45144 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 45144 samples +INFO:root: - Subset dataset +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - The train fold has 36035 samples +INFO:root: - The valid fold has 9109 samples diff --git a/main.py b/main.py index abb6709a9c95724f1a0943ce256a1408eb16e0ba..34d114d6007f9c0d1c02592713f35361a425636a 100644 --- a/main.py +++ b/main.py @@ -33,18 +33,19 @@ if __name__ == "__main__": parser.add_argument( "--rootDir", + default=None, help="Directory in which the log files will be stored" ) args = parser.parse_args() + config_file = open("config.yml") + cfg = yaml.load(config_file) - rootDir = cfg["LogDir"] if eval(args.rootDir) != None else args.rootDir + rootDir = args.rootDir if args.rootDir != None else cfg["LogDir"] logging.basicConfig(filename= rootDir + 'main_unit_test.log', level=logging.INFO) - config_file = open("config.yml") - cfg = yaml.load(config_file) use_cuda = torch.cuda.is_available() trainpath = cfg["Dataset"]["_DEFAULT_TRAIN_FILEPATH"] @@ -71,7 +72,7 @@ if __name__ == "__main__": MAX = eval(cfg["ApproximativeMaxi"]) MIN = eval(cfg["ApproximativeMini"]) else : - MEAN, STD, MAX, MIN = get_stats_train_dataset(trainpath, + MEAN, STD, MAX, MIN = dataloader.get_stats_train_dataset(trainpath, num_days, batch_size, num_workers, diff --git a/model.py b/model.py index 260b88953f34fa70f3cb8b3ee4e318408ce0db02..8276ecbc60f7153df0e47751cf0af3b36c18f034 100644 --- a/model.py +++ b/model.py @@ -3,6 +3,7 @@ import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Function +from torch.autograd import Variable import torch.nn as nn @@ -35,6 +36,32 @@ class LinearRegression(nn.Module): def forward(self, x): return self.regressor(x) +# Recurrent Neural Networks +class RNN(nn.Module): + def __init__(self, cfg, input_size): + super(RNN, self).__init__() + self.hidden_size = cfg["RNN"]["HiddenSize"] + self.num_layers = cfg["RNN"]["NumLayers"] + # RNN + self.rnn = nn.RNN(input_size, self.hidden_size, self.num_layers, batch_first=True, nonlinearity='relu') + + self.fc = nn.Linear(self.hidden_size, 1) + + def forward(self, x): + use_cuda = torch.cuda.is_available() + if use_cuda : + device = torch.device('cuda') + else : + device = toch.device('cpu') + # Initialize hidden state with zeros + h0 = torch.zeros(self.num_layers, x.size(0), self.hidden_size).to(device) + + # One time step + out, hn = self.rnn(x, h0) + out = self.fc(out) + print(out.shape) + return out + # Bidirectional LSTM class BidirectionalLSTM(nn.Module): def __init__(self, cfg, input_size): diff --git a/train.py b/train.py index 335fb5bd325cfcef3094b1aa6c663319a679c43a..77dd78228940831bb81b6ed26bb5d18e6060ece7 100644 --- a/train.py +++ b/train.py @@ -31,6 +31,7 @@ def train(args, model, loader, f_loss, optimizer, device, log_interval = 100): # Compute the forward pass through the network up to the loss outputs = model(inputs) + print(targets.shape) loss = f_loss(outputs, targets) # Backward and optimize diff --git a/train_indices.subset b/train_indices.subset index 8397ff5ff7282cee055b99a389998f7ffa4e9810..42c86043df55f960f18c6cf45c3704b40a70d0c6 100644 Binary files a/train_indices.subset and b/train_indices.subset differ diff --git a/valid_indices.subset b/valid_indices.subset index 3a79d0d0136c4fa04e818334387a2aebe21efbf0..bc5350bc44a87053c90c0530a149ff243d3f56e1 100644 Binary files a/valid_indices.subset and b/valid_indices.subset differ diff --git a/wandb/debug-internal.log b/wandb/debug-internal.log index c56df491396bcbae65252e92f2d506d16b90893e..da21843b9d82e5db6d4b9c142114a12b3aea9fd7 120000 --- a/wandb/debug-internal.log +++ b/wandb/debug-internal.log @@ -1 +1 @@ -run-20230130_164435-f5w8sswr/logs/debug-internal.log \ No newline at end of file +run-20230131_200825-ytr4zy6r/logs/debug-internal.log \ No newline at end of file diff --git a/wandb/debug.log b/wandb/debug.log index 7a9973023fa6cb9b030f3b069af629c2ee45f86d..749761fae83f97d3b8aeffeb8d5861b0a5a1a9ac 120000 --- a/wandb/debug.log +++ b/wandb/debug.log @@ -1 +1 @@ -run-20230130_164435-f5w8sswr/logs/debug.log \ No newline at end of file +run-20230131_200825-ytr4zy6r/logs/debug.log \ No newline at end of file diff --git a/wandb/latest-run b/wandb/latest-run index 487801275d685e65dfba0c1ef82cc656c6859f88..d316e73edb34ef92b38536a3c73189a7a4c7f17f 120000 --- a/wandb/latest-run +++ b/wandb/latest-run @@ -1 +1 @@ -run-20230130_164435-f5w8sswr \ No newline at end of file +run-20230131_200825-ytr4zy6r \ No newline at end of file