Skip to content

Commit 68b2684

Browse files
committed
version 0.3.3
1 parent b074396 commit 68b2684

File tree

5 files changed

+25
-6
lines changed

5 files changed

+25
-6
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.2"
1+
__version__ = "0.3.3"
22
__author__ = 'Tam V. Nguyen'
33
__credits__ = 'Helmholtz Centre for Environmental Research (UFZ)'
44

188 KB
Loading

hydroecolstm/interface/data_frame.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def __create_widgets(self):
8989
# select static data file
9090
self.select_static_file = ctk.CTkButton(self.tabview.tab("1. Load data"),
9191
anchor='e',
92-
text="Select static data file",
92+
text="Select static data file (optional)",
9393
command=self.get_static_file)
9494

9595
self.select_static_file.grid(row=1, column=2, padx = 10,

hydroecolstm/interface/train_test_frame.py

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
from hydroecolstm.model_run import config_to_search_space
88
from CTkToolTip import CTkToolTip
99
import torch
10+
from PIL import Image
11+
from pathlib import Path
1012
from ray import tune # is used within the eval function
1113

1214
class TrainTestFrame(ctk.CTkScrollableFrame):
@@ -34,15 +36,18 @@ def __create_widgets(self):
3436
self.ray_tooltip = ('Or input the tune Search Space API command, ' +
3537
'e.g., tune.grid_search([20, 30]). Please see:' +
3638
'https://docs.ray.io/en/latest/tune/api/search_space.html')
37-
39+
40+
ctk.CTkButton(master=self, anchor='w', fg_color='gray',
41+
text="Parameter explanation",
42+
command=self.__parameter_explanation).pack(anchor="e", pady = 10)
3843
# ---------------------------------------------Initial state dicts
3944
# Load model state dict
4045
self.load_model_label = ctk.CTkLabel(self.tabview.tab("1. Initial state dicts"),
4146
text="1. Load model state dicts")
4247
self.load_model_label.grid(row=0, column=0, sticky = "w")
4348
self.load_model = ctk.CTkButton(self.tabview.tab("1. Initial state dicts"), anchor='w',
4449
command=self.load_state_dict,
45-
text="Load model")
50+
text="Load model (optional)")
4651
self.load_model.grid(row=1, column=0, sticky = "w")
4752
CTkToolTip(self.load_model, delay=0.1, bg_color = 'orange', justify = "left",
4853
text_color = 'black', anchor='w', wraplength=250,
@@ -206,6 +211,20 @@ def __create_widgets(self):
206211
self.progressbar.configure(mode="determinate", progress_color="orange")
207212
self.progressbar.set(0)
208213

214+
215+
# Show parameter explanation
216+
def __parameter_explanation(self):
217+
218+
# Get link to the image
219+
image = Path(__file__).parents[1]
220+
button_image = ctk.CTkImage(Image.open(
221+
Path(image, "images/parameter_explanation.png")),
222+
size=(800, 400))
223+
224+
# Create new window
225+
self.new_window = ctk.CTkToplevel(self, fg_color = "white")
226+
ctk.CTkLabel(master=self.new_window, image=button_image, text = "").pack()
227+
209228
# Get number of epochs
210229
def get_nepoch(self, dummy):
211230
# Get number of hidden layers
@@ -354,7 +373,7 @@ def load_state_dict(self):
354373
self.globalData['init_state_dicts'] = True
355374
self.globalData['init_state_dicts_file'] = state_dict_file
356375
else:
357-
self.load_model.configure(text = "Load model")
376+
self.load_model.configure(text = "Load model (optional)")
358377
self.globalData['init_state_dicts'] = False
359378

360379
# Message box for error in input with tune search space

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.2',
11+
version='0.3.3',
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)