You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: torchhydro/configs/config.py
+94-46Lines changed: 94 additions & 46 deletions
Original file line number
Diff line number
Diff line change
@@ -95,26 +95,6 @@ def default_config_file():
95
95
"source_paths": ["../../example/camels_us"],
96
96
},
97
97
"case_dir": None,
98
-
"batch_size": 100,
99
-
# we generally have three times: [warmup, hindcast_length, forecast_length]
100
-
# For physics-based models, we need warmup; default is 0 as DL models generally don't need it
101
-
"warmup_length": 0,
102
-
# the length of the history data for forecasting
103
-
"hindcast_length": 30,
104
-
# the length of the forecast data
105
-
"forecast_length": 1,
106
-
# config for data of "forecast_length" part
107
-
# for each batch, we fix length of hindcast and forecast length.
108
-
# data from different lead time with a number representing the lead time,
109
-
# for example, now is 2020-09-30, our min_time_interval is 1 day, hindcast length is 30 and forecast length is 1,
110
-
# lead_time = 3 means 2020-09-01 to 2020-09-30, and the forecast data is 2020-10-01 from 2020-09-28
111
-
# for forecast data, we have two different configurations:
112
-
# 1st, we can set a same lead time for all forecast time
113
-
# 2020-09-30now, 30hindcast, 2forecast, 3leadtime means 2020-09-01 to 2020-09-30 obs concatenate with 2020-10-01 forecast data from 2020-09-28 and 2020-10-02 forecast data from 2020-09-29
114
-
# 2nd, we can set a increasing lead time for each forecast time
115
-
# 2020-09-30now, 30hindcast, 2forecast, [1, 2]leadtime means 2020-09-01 to 2020-09-30 obs concatenate with 2020-10-01 to 2010-10-02 forecast data from 2020-09-30
116
-
"lead_time_type": "fixed", # must be fixed or increasing
117
-
"lead_time_start": 1,
118
98
# the min time step of the input data
119
99
"min_time_unit": "D",
120
100
# the min time interval of the input data
@@ -244,6 +224,29 @@ def default_config_file():
244
224
"port": "12335",
245
225
# if train_mode is False, don't train and evaluate
246
226
"train_mode": True,
227
+
"batch_size": 100,
228
+
# we generally have three times: [warmup, hindcast_length, forecast_length]
229
+
# warmup period means no observation will be used to calculate loss for it.
230
+
# For physics-based models, we generally need warmup to get a better initial state
231
+
# its default is 0 as DL models generally don't need it
232
+
"warmup_length": 0,
233
+
# the length of the history data to forecast
234
+
"hindcast_length": 30,
235
+
# the length of the forecast data
236
+
"forecast_length": 1,
237
+
# for each batch, we fix length of hindcast and forecast length.
238
+
# data from different lead time with a number representing the lead time,
239
+
# for example, now is 2020-09-30, our min_time_interval is 1 day, hindcast length is 30 and forecast length is 1,
240
+
# lead_time = 3 means 2020-09-01 to 2020-09-30, and the forecast data is 2020-10-01 from 2020-09-28
241
+
# for forecast data, we have two different configurations:
242
+
# 1st, we can set a same lead time for all forecast time
243
+
# 2020-09-30now, 30hindcast, 2forecast, 3leadtime means 2020-09-01 to 2020-09-30 obs concatenate with 2020-10-01 forecast data from 2020-09-28 and 2020-10-02 forecast data from 2020-09-29
244
+
# 2nd, we can set a increasing lead time for each forecast time
245
+
# 2020-09-30now, 30hindcast, 2forecast, [1, 2]leadtime means 2020-09-01 to 2020-09-30 obs concatenate with 2020-10-01 to 2010-10-02 forecast data from 2020-09-30
246
+
"lead_time_type": "fixed", # must be fixed or increasing
247
+
"lead_time_start": 1,
248
+
# valid batch can be organized as same way with training or testing
249
+
"valid_batch_mode": "test",
247
250
"criterion": "RMSE",
248
251
"criterion_params": None,
249
252
# "weight_decay": None, a regularization term in loss func
@@ -278,7 +281,6 @@ def default_config_file():
278
281
# when we train a model for long time, some accidents may interrupt our training.
279
282
# Then we need retrain the model with saved weights, and the start_epoch is not 1 yet.
0 commit comments