mg-pso-gui 0.1.243__py3-none-any.whl → 0.2.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mg_pso_gui-0.1.243.dist-info → mg_pso_gui-0.2.1.dist-info}/METADATA +1 -1
- {mg_pso_gui-0.1.243.dist-info → mg_pso_gui-0.2.1.dist-info}/RECORD +23 -23
- mgpsogui/gui/General/ParameterView.py +90 -0
- mgpsogui/gui/General/__init__.py +0 -0
- mgpsogui/gui/HomePage.py +14 -52
- mgpsogui/gui/OptionManager.py +194 -195
- mgpsogui/gui/OptionManager_backup.py +443 -0
- mgpsogui/gui/PlatformTab/PlatformTab.py +3 -3
- mgpsogui/gui/SetupTab/BoundsList.py +10 -10
- mgpsogui/gui/SetupTab/CustomFunctionMetrics.py +2 -2
- mgpsogui/gui/SetupTab/FunctionsList.py +7 -7
- mgpsogui/gui/SetupTab/ListEditor.py +1 -3
- mgpsogui/gui/SetupTab/ListParametersView.py +7 -6
- mgpsogui/gui/SetupTab/OptimalParameterView.py +3 -5
- mgpsogui/gui/SetupTab/OverrideParameterMetrics.py +0 -2
- mgpsogui/gui/SetupTab/SetupTab.py +3 -4
- mgpsogui/gui/SetupTab/StepView.py +11 -15
- mgpsogui/gui/VisualizeTab/MatrixEditor.py +3 -3
- mgpsogui/gui/VisualizeTab/SideBar.py +4 -8
- mgpsogui/gui/VisualizeTab/VisualizeTab.py +2 -4
- mgpsogui/gui/PlatformTab/ServiceParametersView.py +0 -61
- mgpsogui/gui/SetupTab/CalibrationParametersView.py +0 -61
- mgpsogui/gui/SetupTab/StaticParameterView.py +0 -61
- {mg_pso_gui-0.1.243.dist-info → mg_pso_gui-0.2.1.dist-info}/WHEEL +0 -0
- {mg_pso_gui-0.1.243.dist-info → mg_pso_gui-0.2.1.dist-info}/entry_points.txt +0 -0
- {mg_pso_gui-0.1.243.dist-info → mg_pso_gui-0.2.1.dist-info}/top_level.txt +0 -0
@@ -1,32 +1,32 @@
|
|
1
1
|
mgpsogui/__init__.py,sha256=q7AfBjeJABnFtbsZnsObpUwaXKPDVYtz46G6MKXLF74,42
|
2
2
|
mgpsogui/mgpsogui.py,sha256=NIZmyNcbwC8EgSwf1ubdMUSJscrIEgoD4jLYziqHQ-k,148
|
3
3
|
mgpsogui/start.yaml,sha256=ZjCVLb-MLqAxrGRm9kA7_SDpa-45EuKIELNQ2QqCAiU,4713
|
4
|
-
mgpsogui/gui/HomePage.py,sha256=
|
5
|
-
mgpsogui/gui/OptionManager.py,sha256=
|
4
|
+
mgpsogui/gui/HomePage.py,sha256=hkrXtQ3rh1vWIxuzTXFgv8h49QCna3XsTZHc-c_csEg,21629
|
5
|
+
mgpsogui/gui/OptionManager.py,sha256=Ssv5IsPfSFlfel7u8JzGAE8sBdqoxsaaiNXOnfDMWz0,20059
|
6
|
+
mgpsogui/gui/OptionManager_backup.py,sha256=TCWfPnHL2foN5id47jsi267lamRG6yGU6y_M29eOOJk,18530
|
6
7
|
mgpsogui/gui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
|
-
mgpsogui/gui/
|
8
|
-
mgpsogui/gui/
|
8
|
+
mgpsogui/gui/General/ParameterView.py,sha256=h6NDjaSmkrsESx5LIBKrvqI-Y4ix8iQwBJ1ZOKewXDk,4776
|
9
|
+
mgpsogui/gui/General/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10
|
+
mgpsogui/gui/PlatformTab/PlatformTab.py,sha256=XVaXjNoH1MBI-587CWigLIT3LGT00yzEAEnXNkzCLrk,10947
|
9
11
|
mgpsogui/gui/PlatformTab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10
12
|
mgpsogui/gui/RunTab/RunTab.py,sha256=8FT7mdxNRQrftDuU0v4LoK1eyH8_RHwLOyM4dz8O_4A,1850
|
11
13
|
mgpsogui/gui/RunTab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
12
14
|
mgpsogui/gui/SetupTab/BoundsEditorWindow.py,sha256=U64oaiDIOaimjbqKMz5rQNq2o1SrQtrRHDdTYQ9ux1s,2870
|
13
|
-
mgpsogui/gui/SetupTab/BoundsList.py,sha256=
|
14
|
-
mgpsogui/gui/SetupTab/CalibrationParametersView.py,sha256=ppVBHG3nphku9-P6Z8az-HTpgk8vHxnj-A5m80BZTgA,2784
|
15
|
+
mgpsogui/gui/SetupTab/BoundsList.py,sha256=A-twr731uKflWTq4AmQcapSsR54a9Y7Zvo1fMFfx8jE,12347
|
15
16
|
mgpsogui/gui/SetupTab/CustomFunctionEditorWindow.py,sha256=yx0dHSNa7fGy99Q6qFcI6j9r8p0DlV3iOBgyPMGd8pM,2884
|
16
|
-
mgpsogui/gui/SetupTab/CustomFunctionMetrics.py,sha256=
|
17
|
-
mgpsogui/gui/SetupTab/FunctionsList.py,sha256=
|
18
|
-
mgpsogui/gui/SetupTab/ListEditor.py,sha256=
|
19
|
-
mgpsogui/gui/SetupTab/ListParametersView.py,sha256=
|
20
|
-
mgpsogui/gui/SetupTab/OptimalParameterView.py,sha256=
|
21
|
-
mgpsogui/gui/SetupTab/OverrideParameterMetrics.py,sha256=
|
17
|
+
mgpsogui/gui/SetupTab/CustomFunctionMetrics.py,sha256=vOJpElbTgz043m6JYwe9xz_2MBHg985S6KdbJkJERW4,5923
|
18
|
+
mgpsogui/gui/SetupTab/FunctionsList.py,sha256=9fnviF24JtIAeDWp5mL_rd0vicfeNPi9dTlVVPf9j1U,6421
|
19
|
+
mgpsogui/gui/SetupTab/ListEditor.py,sha256=nin7Pl8z7d_yfKoAxM-yVS34uhj-LnprJ2mNRSB7Z0A,3197
|
20
|
+
mgpsogui/gui/SetupTab/ListParametersView.py,sha256=mkGaC5cXhEOy5oD0MbTyK9z7VGZp019oK2Y8Ay-n05Q,7460
|
21
|
+
mgpsogui/gui/SetupTab/OptimalParameterView.py,sha256=nliUEWA840cPBQt7wjiZ-L7uBOp_ozzJhyBkL08fJzI,1752
|
22
|
+
mgpsogui/gui/SetupTab/OverrideParameterMetrics.py,sha256=un6lSEQE5SSVhv7xA1Ea-G4JRoaQXCFi052ufDYLBAo,3064
|
22
23
|
mgpsogui/gui/SetupTab/OverrideParameterWindow.py,sha256=UpZDxTaFxee0BeviUYXeiIlMNYNy00qz3zlMlM5VcXE,1291
|
23
|
-
mgpsogui/gui/SetupTab/SetupTab.py,sha256=
|
24
|
-
mgpsogui/gui/SetupTab/
|
25
|
-
mgpsogui/gui/SetupTab/StepView.py,sha256=wBWKOjGoc_CRqBjC_bXN2aq7gMg-tY0a-W5vldQWYmA,9049
|
24
|
+
mgpsogui/gui/SetupTab/SetupTab.py,sha256=uvz604wAgazX9P8naqX9eq-6xwaA8lq-cYTy8lHXkv0,2805
|
25
|
+
mgpsogui/gui/SetupTab/StepView.py,sha256=jdDzCMe7luBKj8q5R0FnjbwPP6u52Dbu041l5XIktSU,8702
|
26
26
|
mgpsogui/gui/SetupTab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
27
|
-
mgpsogui/gui/VisualizeTab/MatrixEditor.py,sha256=
|
28
|
-
mgpsogui/gui/VisualizeTab/SideBar.py,sha256=
|
29
|
-
mgpsogui/gui/VisualizeTab/VisualizeTab.py,sha256=
|
27
|
+
mgpsogui/gui/VisualizeTab/MatrixEditor.py,sha256=Gzyl2hRgjIfO5n0bCZZoXp_vOFvfsJPaGXDUMeRQg10,3171
|
28
|
+
mgpsogui/gui/VisualizeTab/SideBar.py,sha256=FP77ZVEgF5KRX5mWbwpY2NcjptfdUh_-aNuyJdNzyHY,21704
|
29
|
+
mgpsogui/gui/VisualizeTab/VisualizeTab.py,sha256=xeZS1J4RexoFgsKeJDdWi81Hy8xicROGTdawwcGk2O4,6724
|
30
30
|
mgpsogui/gui/VisualizeTab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
31
31
|
mgpsogui/gui/images/collapse.png,sha256=yicb16LaY7Nl5q9V8HHlht-Fbg5xU-l4_LJ_Arfmu1c,2989
|
32
32
|
mgpsogui/gui/images/down.png,sha256=pspJkvUitD648C_2y8JLLD4Eagpk4MDEKQJGOO_yIaY,2654
|
@@ -64,8 +64,8 @@ mgpsogui/util/recosu/utils/trace_writer.py,sha256=V9BJlOjCbNYGoXGEk3CF5wjifBxvar
|
|
64
64
|
mgpsogui/util/recosu/utils/utils.py,sha256=QB8vftq3142ekG0ORjz0ZBHU5YknXbR0oTsrxrPAsF0,3951
|
65
65
|
mgpsogui/util/recosu/utils/plot/__init__.py,sha256=h1KjM7_tNDv351pcwt8A6Ibb1jhwWyx5Gbu-zj-sI3Q,71
|
66
66
|
mgpsogui/util/recosu/utils/plot/cost_steps.py,sha256=1Ce11AJyweWkmvjXPxEygzS-h8yVLmQEDLS53yjPLqQ,3779
|
67
|
-
mg_pso_gui-0.1.
|
68
|
-
mg_pso_gui-0.1.
|
69
|
-
mg_pso_gui-0.1.
|
70
|
-
mg_pso_gui-0.1.
|
71
|
-
mg_pso_gui-0.1.
|
67
|
+
mg_pso_gui-0.2.1.dist-info/METADATA,sha256=0z-bdZkt57ARcmAqqEY9obOY3jiRfZecu2jKgLjFnr8,9454
|
68
|
+
mg_pso_gui-0.2.1.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
|
69
|
+
mg_pso_gui-0.2.1.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
|
70
|
+
mg_pso_gui-0.2.1.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
|
71
|
+
mg_pso_gui-0.2.1.dist-info/RECORD,,
|
@@ -0,0 +1,90 @@
|
|
1
|
+
from customtkinter import CTkScrollableFrame
|
2
|
+
from customtkinter import CTkFrame
|
3
|
+
from customtkinter import CTkLabel
|
4
|
+
from customtkinter import CTkButton
|
5
|
+
from customtkinter import CTkEntry
|
6
|
+
from customtkinter import CTkOptionMenu
|
7
|
+
from tkinter import StringVar as sv
|
8
|
+
import tkinter as tk
|
9
|
+
|
10
|
+
class ParameterView(CTkScrollableFrame):
|
11
|
+
def __init__(self, *args,
|
12
|
+
option_manager: None,
|
13
|
+
list_name: None,
|
14
|
+
**kwargs):
|
15
|
+
super().__init__(*args, **kwargs)
|
16
|
+
|
17
|
+
self.option_manager = option_manager
|
18
|
+
self.list_name = list_name
|
19
|
+
self.key_values = option_manager.get_list(self.list_name)
|
20
|
+
self.edit_mode = False
|
21
|
+
|
22
|
+
self.render()
|
23
|
+
|
24
|
+
def clear(self):
|
25
|
+
self.containerFrame.destroy()
|
26
|
+
|
27
|
+
def toggle_edit_mode(self):
|
28
|
+
self.clear()
|
29
|
+
self.edit_mode = not self.edit_mode
|
30
|
+
self.render()
|
31
|
+
|
32
|
+
def render(self):
|
33
|
+
row = 0
|
34
|
+
index = 0
|
35
|
+
|
36
|
+
self.containerFrame = CTkFrame(self)
|
37
|
+
self.containerFrame.grid(row=0, column=0, padx=(5, 5), pady=(5, 5), sticky="nsew")
|
38
|
+
self.containerFrame.grid_columnconfigure((0, 1, 2, 3, 4, 5), weight=1)
|
39
|
+
|
40
|
+
CTkLabel(self.containerFrame, text="Name:").grid(row=row, column=0, columnspan=3, padx=5, pady=5, sticky="")
|
41
|
+
CTkLabel(self.containerFrame, text="Value:").grid(row=row, column=3, columnspan=3, padx=5, pady=5, sticky="")
|
42
|
+
row += 1
|
43
|
+
|
44
|
+
for key_value_pair in self.key_values:
|
45
|
+
CTkEntry(self.containerFrame, textvariable=self.key_values[index]["name"]).grid(row=row, column=0, columnspan=3, padx=(5, 5), pady=(5, 5), sticky="ew")
|
46
|
+
|
47
|
+
if self.edit_mode:
|
48
|
+
return_func = lambda index=index: (self.clear(), self.option_manager.remove_key_value(self.list_name, index), self.render())
|
49
|
+
CTkButton(self.containerFrame, text="Remove", command=return_func).grid(row=row, column=3, columnspan=3, padx=(5, 5), pady=(5, 5), sticky="ew")
|
50
|
+
else:
|
51
|
+
type = self.key_values[index]["type"].get()
|
52
|
+
|
53
|
+
if type == "boolean":
|
54
|
+
bb = CTkOptionMenu(self.containerFrame, values=["True", "False", "NULL"], variable=self.key_values[index]["value"])
|
55
|
+
bb.grid(row=row, column=3, columnspan=3, padx=(5, 5), pady=(5, 5), sticky="ew")
|
56
|
+
elif type == "date":
|
57
|
+
om_text_var = self.key_values[index]["value"]
|
58
|
+
year = sv()
|
59
|
+
month = sv()
|
60
|
+
day = sv()
|
61
|
+
vv = om_text_var.get().split("-")
|
62
|
+
year.set(vv[0])
|
63
|
+
month.set(vv[1])
|
64
|
+
day.set(vv[2])
|
65
|
+
year_options = [str(i) for i in range(1999, 2030)]
|
66
|
+
month_options = [str(i) for i in range(1, 13)]
|
67
|
+
day_options = [str(i) for i in range(1, 32)]
|
68
|
+
|
69
|
+
update_date = lambda om_text_var=om_text_var, year=year, month=month, day=day: om_text_var.set(f"{year.get()}-{month.get()}-{day.get()}")
|
70
|
+
year_menu = CTkOptionMenu(self.containerFrame, textvariable=year, values=year_options, command=update_date)
|
71
|
+
year_menu.grid(row=row, column=3, columnspan=1, padx=(0, 0), pady=(5, 5), sticky="ew")
|
72
|
+
month_menu = CTkOptionMenu(self.containerFrame, textvariable=month, values=month_options, command=update_date)
|
73
|
+
month_menu.grid(row=row, column=4, columnspan=1, padx=(0, 0), pady=(5, 5), sticky="ew")
|
74
|
+
day_menu = CTkOptionMenu(self.containerFrame, textvariable=day, values=day_options, command=update_date)
|
75
|
+
day_menu.grid(row=row, column=5, columnspan=1, padx=(0, 0), pady=(5, 5), sticky="ew")
|
76
|
+
else:
|
77
|
+
bb = CTkEntry(self.containerFrame)
|
78
|
+
bb.grid(row=row, column=3, columnspan=3, padx=(5, 5), pady=(5, 5), sticky="ew")
|
79
|
+
bb.configure(textvariable=self.key_values[index]["value"])
|
80
|
+
row += 1
|
81
|
+
index += 1
|
82
|
+
|
83
|
+
if self.edit_mode:
|
84
|
+
CTkButton(self.containerFrame, text="Exit", command=self.toggle_edit_mode).grid(row=row, column=0, columnspan=3, padx=(5, 5), pady=(5, 5), sticky="ew")
|
85
|
+
else:
|
86
|
+
CTkButton(self.containerFrame, text="Edit", command=self.toggle_edit_mode).grid(row=row, column=0, columnspan=3, padx=(5, 5), pady=(5, 5), sticky="ew")
|
87
|
+
|
88
|
+
add_key_func = lambda: (self.clear(), self.option_manager.add_key_value(self.list_name, "name", "value"), self.render())
|
89
|
+
|
90
|
+
CTkButton(self.containerFrame, text="Add Parameter", command=add_key_func).grid(row=row, column=3, columnspan=3, padx=(5, 5), pady=(5, 5), sticky="ew")
|
File without changes
|
mgpsogui/gui/HomePage.py
CHANGED
@@ -143,16 +143,15 @@ class App(customtkinter.CTk):
|
|
143
143
|
# 4 is service URL
|
144
144
|
self.service_label = customtkinter.CTkLabel(self.sidebar_frame, text="Service:", anchor="w")
|
145
145
|
self.service_label.grid(row=0, column=3, padx=(80, 5), pady=header_padding_y)
|
146
|
-
self.service_url = customtkinter.CTkEntry(self.sidebar_frame, textvariable=self.option_manager.
|
146
|
+
self.service_url = customtkinter.CTkEntry(self.sidebar_frame, textvariable=self.option_manager.get("url"))
|
147
147
|
self.service_url.grid(row=0, column=4, columnspan=1, padx=header_padding_x, pady=header_padding_y, sticky="nsew")
|
148
148
|
refresh_image = customtkinter.CTkImage(Image.open(os.path.join("./images", "refresh.png")), size=(20, 20))
|
149
149
|
self.refresh_button = customtkinter.CTkButton(self.sidebar_frame, text=None, width=30, image=refresh_image, command=self.load)
|
150
150
|
ctt(self.refresh_button, delay=0.1, alpha=0.95, message="Connect to Service")
|
151
151
|
self.refresh_button.grid(row=0, column=5, padx=header_padding_x, pady=header_padding_y)
|
152
152
|
|
153
|
-
self.algorithm_optionmenu = customtkinter.CTkOptionMenu(self.sidebar_frame, variable=self.option_manager.
|
153
|
+
self.algorithm_optionmenu = customtkinter.CTkOptionMenu(self.sidebar_frame, variable=self.option_manager.get_mode_sv(), values=self.option_manager.get_service_modes(), width=50, command=self.refresh_step_view)
|
154
154
|
self.algorithm_optionmenu.grid(row=0, column=6, padx=(5, 80), pady=header_padding_y)
|
155
|
-
self.algorithm_optionmenu.set(self.option_manager.service_modes[0])
|
156
155
|
|
157
156
|
self.scaling_label = customtkinter.CTkLabel(self.sidebar_frame, text="Scale:", anchor="w")
|
158
157
|
self.scaling_label.grid(row=0, column=7, padx=header_padding_x, pady=header_padding_y)
|
@@ -221,22 +220,11 @@ class App(customtkinter.CTk):
|
|
221
220
|
GraphGenerator.generate_graphs(self)
|
222
221
|
|
223
222
|
def save_project(self):
|
224
|
-
metrics = self.option_manager.get_metrics()
|
225
|
-
|
226
|
-
# Add the calibration_progress dataframe to the json
|
227
|
-
if (self.progress_data is not None):
|
228
|
-
metrics["calibration_progress"] = self.progress_data.to_json()
|
229
|
-
# Add the calibration_data to the json
|
230
|
-
if (self.calibration_data is not None):
|
231
|
-
metrics["calibration_data"] = self.calibration_data
|
232
|
-
|
233
223
|
filename = asksaveasfilename(filetypes=[("JSON", "*.json")], initialfile="config", defaultextension="json", title="Save Project")
|
234
224
|
|
235
225
|
try:
|
236
226
|
|
237
|
-
|
238
|
-
with open(filename, "w") as f:
|
239
|
-
f.write(json.dumps(metrics, indent=4))
|
227
|
+
self.option_manager.save_project(filename)
|
240
228
|
|
241
229
|
self.save_button.configure(text="Saved!")
|
242
230
|
self.after(3000, lambda: self.save_button.configure(text="Save"))
|
@@ -246,8 +234,8 @@ class App(customtkinter.CTk):
|
|
246
234
|
self.after(3000, lambda: self.save_button.configure(text="Save"))
|
247
235
|
|
248
236
|
def refresh_step_view(self, value):
|
249
|
-
mode = self.option_manager.
|
250
|
-
self.service_url.configure(textvariable=self.option_manager.
|
237
|
+
mode = self.option_manager.get_mode()
|
238
|
+
self.service_url.configure(textvariable=self.option_manager.get("url"))
|
251
239
|
|
252
240
|
if mode == "Optimization":
|
253
241
|
self.test_button.configure(state="normal")
|
@@ -276,33 +264,7 @@ class App(customtkinter.CTk):
|
|
276
264
|
|
277
265
|
try:
|
278
266
|
|
279
|
-
|
280
|
-
with open(filename, "r") as f:
|
281
|
-
metrics = json.loads(f.read())
|
282
|
-
|
283
|
-
self.option_manager.set_path(filename)
|
284
|
-
|
285
|
-
if "arguments" in metrics:
|
286
|
-
metrics["arguments"]["calibration_parameters"] = metrics["calibration_parameters"]
|
287
|
-
|
288
|
-
if "service_parameters" in metrics:
|
289
|
-
self.option_manager.set_service_parameters(metrics["service_parameters"])
|
290
|
-
self.tabview.configure(state="enabled")
|
291
|
-
|
292
|
-
if "calibration_progress" in metrics:
|
293
|
-
self.progress_data = pd.read_json(metrics["calibration_progress"])
|
294
|
-
self.calibration_data = metrics["calibration_data"]
|
295
|
-
print(self.progress_data)
|
296
|
-
|
297
|
-
if "calibration_data" in metrics:
|
298
|
-
self.calibration_data = metrics["calibration_data"]
|
299
|
-
print(self.calibration_data)
|
300
|
-
|
301
|
-
print(metrics)
|
302
|
-
|
303
|
-
self.option_manager.clear()
|
304
|
-
self.option_manager.add_arguments(metrics["arguments"])
|
305
|
-
self.option_manager.add_steps(metrics["steps"])
|
267
|
+
self.option_manager.load_project(filename)
|
306
268
|
|
307
269
|
self.steps_frame.clear()
|
308
270
|
self.steps_frame.render()
|
@@ -345,7 +307,7 @@ class App(customtkinter.CTk):
|
|
345
307
|
response_json = json.loads(response.text)
|
346
308
|
status = response.status_code
|
347
309
|
|
348
|
-
self.option_manager.
|
310
|
+
self.option_manager.set_data("service_request_data", response_json)
|
349
311
|
|
350
312
|
self.service_status.delete('0.0', tk.END)
|
351
313
|
self.service_status.insert(text=str(status), index='0.0')
|
@@ -377,6 +339,8 @@ class App(customtkinter.CTk):
|
|
377
339
|
self.run()
|
378
340
|
|
379
341
|
def run(self):
|
342
|
+
pass
|
343
|
+
"""
|
380
344
|
metrics = self.option_manager.get_metrics()
|
381
345
|
self.running_config = metrics
|
382
346
|
|
@@ -442,13 +406,13 @@ class App(customtkinter.CTk):
|
|
442
406
|
self.footer_progress_bar.configure(mode="determinate")
|
443
407
|
#self.progress_bar.set(0)
|
444
408
|
self.footer_progress_bar.set(0)
|
409
|
+
"""
|
445
410
|
|
446
411
|
def stop(self):
|
447
412
|
print("Stopping...")
|
448
413
|
self.train_process.terminate()
|
449
414
|
|
450
|
-
|
451
|
-
folder = os.path.join(info['path'], info['name'])
|
415
|
+
folder = self.option_manager.get_project_folder()
|
452
416
|
|
453
417
|
if not os.path.exists(folder):
|
454
418
|
os.makedirs(folder)
|
@@ -483,9 +447,7 @@ class App(customtkinter.CTk):
|
|
483
447
|
def watch_loop(self):
|
484
448
|
print("Watch loop running...")
|
485
449
|
|
486
|
-
|
487
|
-
info = self.option_manager.get_project_data()
|
488
|
-
folder = os.path.join(info['path'], info['name'])
|
450
|
+
folder = self.option_manager.get_project_folder()
|
489
451
|
|
490
452
|
if not os.path.exists(folder):
|
491
453
|
os.makedirs(folder)
|
@@ -526,7 +488,7 @@ class App(customtkinter.CTk):
|
|
526
488
|
for param in step.keys():
|
527
489
|
value = step[param]
|
528
490
|
target_step = all_steps[index]
|
529
|
-
for target_param in target_step['
|
491
|
+
for target_param in target_step['parameter_objects']:
|
530
492
|
if target_param['name'].get() == param:
|
531
493
|
target_param['optimal_value'].set(value)
|
532
494
|
index += 1
|
@@ -579,7 +541,7 @@ class App(customtkinter.CTk):
|
|
579
541
|
print(e)
|
580
542
|
|
581
543
|
# Parse data into interface
|
582
|
-
mode = self.option_manager.
|
544
|
+
mode = self.option_manager.get_mode()
|
583
545
|
if mode == "Optimization":
|
584
546
|
if (os.path.exists(os.path.join(folder, 'error.txt'))):
|
585
547
|
data = hp.parse_pso_error(os.path.join(folder, 'error.txt'), len(self.option_manager.get_steps()))
|