diff --git a/config.yml b/config.yml index 67936962b9dfd703b004f9b26ea359903d6d00b3..54cd4b30ada668e998597545dad8301359fb6d74 100644 --- a/config.yml +++ b/config.yml @@ -13,7 +13,7 @@ Dataset: _ENCODING_ENDIAN: "<" # Data Transformation -ApproximativeStats: False +ApproximativeStats: True ApproximativeMean: "torch.tensor([ 4.2457e+01, 7.4651e+00, 1.6738e+02, 1.3576e+09, 2.3628e+00, 4.6839e+01, 2.3855e-01, 3.6535e+00, 1.9776e+00, 2.2628e+02, diff --git a/job.py b/job.py index 0a381aa1e458b12061008ca690fbb060696bca73..f67ea436ec039b83d6f42ad4549f8f9b5a576b55 100644 --- a/job.py +++ b/job.py @@ -36,8 +36,14 @@ virtualenv -p python3 venv source venv/bin/activate python -m pip install -r requirements.txt +export PATH="~/.local/bin:$PATH" + +echo "Login to Wandb" +wandb login +1a58b15c3c3ebcce186aa7185746efd5c2401a6c + echo "Running main.py" -python3 main.py --rootDir /usr/users/sdi1/sdi1_3/Projet_DL/Kaggle_Phytoplankton/logs/ --no_wandb +python3 main.py --rootDir /usr/users/sdi1/sdi1_3/Projet_DL/Kaggle_Phytoplankton/logs/ if [[ $? != 0 ]]; then exit -1 diff --git a/logs/RNN_10/best_model.pt b/logs/RNN_10/best_model.pt deleted file mode 100644 index f8d968cac7081869f7b8d04188c743c4dd9b79da..0000000000000000000000000000000000000000 Binary files a/logs/RNN_10/best_model.pt and /dev/null differ diff --git a/logs/RNN_13/best_model.pt b/logs/RNN_13/best_model.pt deleted file mode 100644 index 46fccfaa11e6ab05caaa8f8a0eadbbf8db18deee..0000000000000000000000000000000000000000 Binary files a/logs/RNN_13/best_model.pt and /dev/null differ diff --git a/logs/RNN_14/best_model.pt b/logs/RNN_14/best_model.pt deleted file mode 100644 index b69ff01c91bd59207cda55c61b311d2940e99848..0000000000000000000000000000000000000000 Binary files a/logs/RNN_14/best_model.pt and /dev/null differ diff --git a/logs/RNN_15/best_model.pt b/logs/RNN_15/best_model.pt deleted file mode 100644 index e241d2c69a40615e3c7e64eece045a3748e33492..0000000000000000000000000000000000000000 Binary files a/logs/RNN_15/best_model.pt and /dev/null differ diff --git a/logs/RNN_16/best_model.pt b/logs/RNN_16/best_model.pt deleted file mode 100644 index 25bde8ea91e12434ab22f917160a4c8d7edad06a..0000000000000000000000000000000000000000 Binary files a/logs/RNN_16/best_model.pt and /dev/null differ diff --git a/logs/RNN_9/best_model.pt b/logs/RNN_9/best_model.pt deleted file mode 100644 index e65e60cc2a9996d1c070bcace8d2b145d68eb7a8..0000000000000000000000000000000000000000 Binary files a/logs/RNN_9/best_model.pt and /dev/null differ diff --git a/logs/main_unit_test.log b/logs/main_unit_test.log index b7fd286ad67cba641e4a22b8dd7ed479a9763dd7..ea36318efd7ca71d0bebf9ce4b7a69c90f7fcfcd 100644 --- a/logs/main_unit_test.log +++ b/logs/main_unit_test.log @@ -1463,3 +1463,132 @@ 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 542419 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 677160 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 677160 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 541589 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 677160 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 677160 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 541929 samples +INFO:root: - The valid fold has 135231 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 677160 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 677160 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 541921 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 677160 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 677160 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 541662 samples +INFO:root: - The valid fold has 135498 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 677160 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 677160 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 541774 samples +INFO:root: - The valid fold has 135386 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 677160 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 677160 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 542242 samples +INFO:root: - The valid fold has 134918 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 677160 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 677160 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 541347 samples +INFO:root: - The valid fold has 135813 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 677160 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 677160 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 542017 samples +INFO:root: - The valid fold has 135143 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 677160 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 677160 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 541789 samples +INFO:root: - The valid fold has 135371 samples diff --git a/model.py b/model.py index 4a3e03387a6918c12f87f8cdb0438bbb9497a26d..6f49f5122804756d8ec6244570e0d22c78cdb935 100644 --- a/model.py +++ b/model.py @@ -20,16 +20,6 @@ class LinearRegression(nn.Module): nn.Linear(self.hidden_size, self.hidden_size, self.bias), nn.ReLU(), nn.Linear(self.hidden_size,self.hidden_size,self.bias), - nn.ReLU(), - nn.Linear(self.hidden_size,self.hidden_size,self.bias), - nn.ReLU(), - nn.Linear(self.hidden_size,self.hidden_size,self.bias), - nn.ReLU(), - nn.Linear(self.hidden_size,self.hidden_size,self.bias), - nn.ReLU(), - nn.Linear(self.hidden_size,self.hidden_size, self.bias), - nn.ReLU(), - nn.Linear(self.hidden_size,1, self.bias), nn.ReLU() ) @@ -45,10 +35,8 @@ class RNN(nn.Module): self.num_ffn = cfg["RNN"]["NumFFN"] self.dropout = cfg["RNN"]["Dropout"] # RNN - self.rnn = nn.Sequential( - nn.RNN(input_size, self.hidden_size, self.num_layers, batch_first=True, nonlinearity='relu'), - nn.Dropout(p=0.2) - ) + self.rnn = nn.RNN(input_size, self.hidden_size, self.num_layers, batch_first=True, nonlinearity='relu') + self.fc = nn.Sequential() @@ -65,7 +53,6 @@ class RNN(nn.Module): f"dropout_{layer}", nn.Dropout(p=self.dropout) ) - self.fc.add_module( "last_linear", nn.Linear(self.hidden_size, 1) @@ -80,8 +67,8 @@ class RNN(nn.Module): device = toch.device('cpu') # Initialize hidden state with zeros h0 = torch.zeros(self.num_layers, x.size(0), self.hidden_size).to(device) - out, hn = self.rnn(x, h0) + out = nn.Dropout(p= self.dropout)(out) out = self.fc(out) return out diff --git a/train_indices.subset b/train_indices.subset index 5238f2b72ac26e10ef503aef30c8edad75a3c638..d5948c507d73de00e7c948102ebfea539209a40d 100644 Binary files a/train_indices.subset and b/train_indices.subset differ diff --git a/valid_indices.subset b/valid_indices.subset index d7bfae7db48036e9d0573234d973dce5c55fab6c..d0755c597744bcb37c9eca6a9d1e71430d05ba7c 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 201421dc4c618735b49a29e0c8a9fdbe1d6c7240..6a852e786fa2c05e19a98111fd7d9bc3c00639ee 120000 --- a/wandb/debug-internal.log +++ b/wandb/debug-internal.log @@ -1 +1 @@ -run-20230203_210417-nbeo06fq/logs/debug-internal.log \ No newline at end of file +run-20230203_215737-zxchwf43/logs/debug-internal.log \ No newline at end of file diff --git a/wandb/debug.log b/wandb/debug.log index 162bc4fc582d102c3d9c237d0daafb3422a4ee83..f441fad8d1a61f2b965b9d8f8f55793517280689 120000 --- a/wandb/debug.log +++ b/wandb/debug.log @@ -1 +1 @@ -run-20230203_210417-nbeo06fq/logs/debug.log \ No newline at end of file +run-20230203_215737-zxchwf43/logs/debug.log \ No newline at end of file diff --git a/wandb/latest-run b/wandb/latest-run index dc1b371b55b39600231afca9ecea0843dd3c166b..f5aacd3beb2c843c21f3e9dd475ca9d49263a27a 120000 --- a/wandb/latest-run +++ b/wandb/latest-run @@ -1 +1 @@ -run-20230203_210417-nbeo06fq \ No newline at end of file +run-20230203_215737-zxchwf43 \ No newline at end of file