mg-pso-gui 0.1.243__tar.gz → 0.2.1__tar.gz
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 → mg_pso_gui-0.2.1}/PKG-INFO +1 -1
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mg_pso_gui.egg-info/PKG-INFO +1 -1
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mg_pso_gui.egg-info/SOURCES.txt +3 -3
- mg_pso_gui-0.2.1/mgpsogui/gui/General/ParameterView.py +90 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/gui/HomePage.py +14 -52
- mg_pso_gui-0.2.1/mgpsogui/gui/OptionManager.py +441 -0
- mg_pso_gui-0.1.243/mgpsogui/gui/OptionManager.py → mg_pso_gui-0.2.1/mgpsogui/gui/OptionManager_backup.py +2 -1
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/gui/PlatformTab/PlatformTab.py +3 -3
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/gui/SetupTab/BoundsList.py +10 -10
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/gui/SetupTab/CustomFunctionMetrics.py +2 -2
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/gui/SetupTab/FunctionsList.py +7 -7
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/gui/SetupTab/ListEditor.py +1 -3
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/gui/SetupTab/ListParametersView.py +7 -6
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/gui/SetupTab/OptimalParameterView.py +3 -5
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/gui/SetupTab/OverrideParameterMetrics.py +0 -2
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/gui/SetupTab/SetupTab.py +3 -4
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/gui/SetupTab/StepView.py +11 -15
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/gui/VisualizeTab/MatrixEditor.py +3 -3
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/gui/VisualizeTab/SideBar.py +4 -8
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/gui/VisualizeTab/VisualizeTab.py +2 -4
- mg_pso_gui-0.2.1/mgpsogui/util/recosu/sampling/random/__init__.py +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/setup.py +1 -1
- mg_pso_gui-0.1.243/mgpsogui/gui/PlatformTab/ServiceParametersView.py +0 -61
- mg_pso_gui-0.1.243/mgpsogui/gui/SetupTab/CalibrationParametersView.py +0 -61
- mg_pso_gui-0.1.243/mgpsogui/gui/SetupTab/StaticParameterView.py +0 -61
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mg_pso_gui.egg-info/dependency_links.txt +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mg_pso_gui.egg-info/entry_points.txt +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mg_pso_gui.egg-info/requires.txt +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mg_pso_gui.egg-info/top_level.txt +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/__init__.py +0 -0
- {mg_pso_gui-0.1.243/mgpsogui/gui/PlatformTab → mg_pso_gui-0.2.1/mgpsogui/gui/General}/__init__.py +0 -0
- {mg_pso_gui-0.1.243/mgpsogui/gui/RunTab → mg_pso_gui-0.2.1/mgpsogui/gui/PlatformTab}/__init__.py +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/gui/RunTab/RunTab.py +0 -0
- {mg_pso_gui-0.1.243/mgpsogui/gui/SetupTab → mg_pso_gui-0.2.1/mgpsogui/gui/RunTab}/__init__.py +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/gui/SetupTab/BoundsEditorWindow.py +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/gui/SetupTab/CustomFunctionEditorWindow.py +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/gui/SetupTab/OverrideParameterWindow.py +0 -0
- {mg_pso_gui-0.1.243/mgpsogui/gui/VisualizeTab → mg_pso_gui-0.2.1/mgpsogui/gui/SetupTab}/__init__.py +0 -0
- {mg_pso_gui-0.1.243/mgpsogui/gui → mg_pso_gui-0.2.1/mgpsogui/gui/VisualizeTab}/__init__.py +0 -0
- {mg_pso_gui-0.1.243/mgpsogui/util → mg_pso_gui-0.2.1/mgpsogui/gui}/__init__.py +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/gui/images/collapse.png +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/gui/images/down.png +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/gui/images/expand.png +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/gui/images/play.png +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/gui/images/refresh.png +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/gui/images/refresh_hd.png +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/gui/images/stop.png +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/gui/images/test.png +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/gui/images/trash.png +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/gui/images/up.png +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/mgpsogui.py +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/start.yaml +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/util/CTkToolTip/__init__.py +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/util/CTkToolTip/ctk_tooltip.py +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/util/GraphGenerator.py +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/util/PSORunner.py +0 -0
- {mg_pso_gui-0.1.243/mgpsogui/util/recosu/sampling/halton → mg_pso_gui-0.2.1/mgpsogui/util}/__init__.py +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/util/debug.py +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/util/helpers.py +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/util/recosu/__init__.py +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/util/recosu/pso/__init__.py +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/util/recosu/pso/csip_access.py +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/util/recosu/pso/pso.py +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/util/recosu/sampling/__init__.py +0 -0
- {mg_pso_gui-0.1.243/mgpsogui/util/recosu/sampling/random → mg_pso_gui-0.2.1/mgpsogui/util/recosu/sampling/halton}/__init__.py +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/util/recosu/sampling/halton/halton.py +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/util/recosu/sampling/halton/prime.py +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/util/recosu/sampling/random/random_sampler.py +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/util/recosu/sampling/sample_trace_writer.py +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/util/recosu/sampling/sampler_task.py +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/util/recosu/sampling/sampling.py +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/util/recosu/utils/__init__.py +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/util/recosu/utils/plot/__init__.py +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/util/recosu/utils/plot/cost_steps.py +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/util/recosu/utils/trace_writer.py +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/util/recosu/utils/utils.py +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/mgpsogui/util/sampler_test_driver.py +0 -0
- {mg_pso_gui-0.1.243 → mg_pso_gui-0.2.1}/setup.cfg +0 -0
@@ -10,15 +10,16 @@ mgpsogui/mgpsogui.py
|
|
10
10
|
mgpsogui/start.yaml
|
11
11
|
mgpsogui/gui/HomePage.py
|
12
12
|
mgpsogui/gui/OptionManager.py
|
13
|
+
mgpsogui/gui/OptionManager_backup.py
|
13
14
|
mgpsogui/gui/__init__.py
|
15
|
+
mgpsogui/gui/General/ParameterView.py
|
16
|
+
mgpsogui/gui/General/__init__.py
|
14
17
|
mgpsogui/gui/PlatformTab/PlatformTab.py
|
15
|
-
mgpsogui/gui/PlatformTab/ServiceParametersView.py
|
16
18
|
mgpsogui/gui/PlatformTab/__init__.py
|
17
19
|
mgpsogui/gui/RunTab/RunTab.py
|
18
20
|
mgpsogui/gui/RunTab/__init__.py
|
19
21
|
mgpsogui/gui/SetupTab/BoundsEditorWindow.py
|
20
22
|
mgpsogui/gui/SetupTab/BoundsList.py
|
21
|
-
mgpsogui/gui/SetupTab/CalibrationParametersView.py
|
22
23
|
mgpsogui/gui/SetupTab/CustomFunctionEditorWindow.py
|
23
24
|
mgpsogui/gui/SetupTab/CustomFunctionMetrics.py
|
24
25
|
mgpsogui/gui/SetupTab/FunctionsList.py
|
@@ -28,7 +29,6 @@ mgpsogui/gui/SetupTab/OptimalParameterView.py
|
|
28
29
|
mgpsogui/gui/SetupTab/OverrideParameterMetrics.py
|
29
30
|
mgpsogui/gui/SetupTab/OverrideParameterWindow.py
|
30
31
|
mgpsogui/gui/SetupTab/SetupTab.py
|
31
|
-
mgpsogui/gui/SetupTab/StaticParameterView.py
|
32
32
|
mgpsogui/gui/SetupTab/StepView.py
|
33
33
|
mgpsogui/gui/SetupTab/__init__.py
|
34
34
|
mgpsogui/gui/VisualizeTab/MatrixEditor.py
|
@@ -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")
|
@@ -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()))
|