Skip to content

Commit 85f6867

Browse files
authored
Merge pull request #21 from tamnva/development
fix: load data.pt file with pytorch
2 parents 9a52217 + 6d4b605 commit 85f6867

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

hydroecolstm/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "0.3.6"
1+
__version__ = "0.3.7"
22
__author__ = 'Tam V. Nguyen'
33
__credits__ = 'Helmholtz Centre for Environmental Research (UFZ)'
44

hydroecolstm/interface/visualize_frame.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,9 +421,8 @@ def load_data_event(self):
421421
file_name=ctk.filedialog.askopenfilename(title="Select data.pt file type",
422422
filetypes=(('pt files', '*.pt'),
423423
('All files', '*.*')))
424-
self.globalData.update(torch.load(file_name))
424+
self.globalData.update(torch.load(file_name, weights_only=False))
425425
self.selected_data_file.configure(text= '...' + file_name[-30:])
426-
print(self.globalData.keys())
427426
except:
428427
pass
429428

hydroecolstm/model_run.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ def run_config(config):
5353
# Create model
5454
best_result = result.get_best_result("loss", mode="min")
5555
best_config = best_result.config
56+
5657
del best_result.config["x_train_scale"],
5758
del best_result.config["y_train_scale"]
5859
del best_result.config["x_valid_scale"]

hydroecolstm/train/trainer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def train(self,
134134
check_point)
135135

136136
if early_stopping.early_stop:
137-
print("Early stopping")
137+
print("Early stopping.")
138138
break
139139

140140
# If the model does not stops until the last epoch

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
setup(
1010
name='hydroecolstm',
11-
version='0.3.6',
11+
version='0.3.7',
1212
description='A python package for HydroEcological Modelling using LSTM',
1313
long_description=long_description,
1414
long_description_content_type='text/markdown',

0 commit comments

Comments
 (0)