mg-pso-gui 0.1.19__tar.gz → 0.1.20__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.19 → mg-pso-gui-0.1.20}/PKG-INFO +1 -1
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mg_pso_gui.egg-info/PKG-INFO +1 -1
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/gui/HomePage.py +37 -35
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/util/GraphGenerator.py +3 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/setup.py +1 -1
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mg_pso_gui.egg-info/SOURCES.txt +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mg_pso_gui.egg-info/dependency_links.txt +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mg_pso_gui.egg-info/entry_points.txt +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mg_pso_gui.egg-info/requires.txt +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mg_pso_gui.egg-info/top_level.txt +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/__init__.py +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/gui/OptionManager.py +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/gui/PlatformTab/PlatformTab.py +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/gui/PlatformTab/__init__.py +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/gui/RunTab/RunTab.py +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/gui/RunTab/__init__.py +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/gui/SetupTab/BoundsEditorWindow.py +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/gui/SetupTab/BoundsList.py +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/gui/SetupTab/CalibrationParametersView.py +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/gui/SetupTab/FunctionsList.py +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/gui/SetupTab/ListParametersView.py +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/gui/SetupTab/SetupTab.py +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/gui/SetupTab/StaticParameterView.py +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/gui/SetupTab/StepView.py +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/gui/SetupTab/__init__.py +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/gui/VisualizeTab/VisualizeTab.py +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/gui/VisualizeTab/__init__.py +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/gui/__init__.py +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/gui/images/IGOW 4 Logo.png +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/gui/images/collapse.png +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/gui/images/down.png +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/gui/images/expand.png +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/gui/images/play.png +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/gui/images/refresh.png +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/gui/images/refresh_hd.png +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/gui/images/stop.png +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/gui/images/test.png +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/gui/images/trash.png +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/gui/images/up.png +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/mgpsogui.py +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/start.yaml +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/util/CTkToolTip/__init__.py +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/util/CTkToolTip/ctk_tooltip.py +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/util/PSORunner.py +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/util/__init__.py +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/util/recosu/__init__.py +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/util/recosu/pso/__init__.py +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/util/recosu/pso/csip_access.py +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/util/recosu/pso/pso.py +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/util/recosu/utils/__init__.py +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/util/recosu/utils/plot/__init__.py +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/util/recosu/utils/plot/cost_steps.py +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/util/recosu/utils/trace_writer.py +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/mgpsogui/util/recosu/utils/utils.py +0 -0
- {mg-pso-gui-0.1.19 → mg-pso-gui-0.1.20}/setup.cfg +0 -0
|
@@ -70,8 +70,11 @@ class App(customtkinter.CTk):
|
|
|
70
70
|
self.data_x = [0]
|
|
71
71
|
self.data_y = [0]
|
|
72
72
|
|
|
73
|
+
self.image_scale = 1
|
|
73
74
|
self.image_width = 1280
|
|
74
75
|
self.image_height = 720
|
|
76
|
+
self.progress_data = None
|
|
77
|
+
self.calibration_data = None
|
|
75
78
|
|
|
76
79
|
# configure window
|
|
77
80
|
self.title("CSIP PSO")
|
|
@@ -172,7 +175,7 @@ class App(customtkinter.CTk):
|
|
|
172
175
|
ctt(self.download_button, delay=0.1, alpha=0.95, message="Download Results")
|
|
173
176
|
self.download_button.grid(row=0, column=10, padx=(5, 20), pady=header_padding_y)
|
|
174
177
|
|
|
175
|
-
def _resize_image(self, event):
|
|
178
|
+
'''def _resize_image(self, event):
|
|
176
179
|
self.graph_label.update_idletasks()
|
|
177
180
|
new_width = self.graph_label.winfo_width()
|
|
178
181
|
new_height = self.graph_label.winfo_height()
|
|
@@ -190,10 +193,7 @@ class App(customtkinter.CTk):
|
|
|
190
193
|
|
|
191
194
|
self.graph_image = customtkinter.CTkImage(self.graph_image_obj, size=(new_width, new_height))
|
|
192
195
|
self.graph_label.configure(image=self.graph_image)
|
|
193
|
-
self.graph_label.update_idletasks()
|
|
194
|
-
|
|
195
|
-
def callback_test(self, *args):
|
|
196
|
-
print("callback_test called")
|
|
196
|
+
self.graph_label.update_idletasks()'''
|
|
197
197
|
|
|
198
198
|
def update_graph(self, value):
|
|
199
199
|
selected_graph = self.graph_selector_value.get()
|
|
@@ -205,39 +205,30 @@ class App(customtkinter.CTk):
|
|
|
205
205
|
|
|
206
206
|
if (selected_graph == "Best Cost Stacked"):
|
|
207
207
|
self.selected_graph_name = "best_cost_stacked"
|
|
208
|
-
image_path = os.path.join(folder, self.selected_graph_name + ".png")
|
|
209
|
-
if not os.path.exists(image_path):
|
|
210
|
-
image_path = os.path.join("./images", "up.png")
|
|
211
|
-
self.graph_image_obj = Image.open(image_path)
|
|
212
|
-
self.graph_image = customtkinter.CTkImage(self.graph_image_obj, size=(self.image_width, self.image_height))
|
|
213
|
-
self.graph_label.configure(image=self.graph_image)
|
|
214
208
|
elif (selected_graph == "Best Cost by Round"):
|
|
215
209
|
self.selected_graph_name = "best_cost_by_round"
|
|
216
|
-
image_path = os.path.join(folder, self.selected_graph_name + ".png")
|
|
217
|
-
if not os.path.exists(image_path):
|
|
218
|
-
image_path = os.path.join("./images", "up.png")
|
|
219
|
-
self.graph_image_obj = Image.open(image_path)
|
|
220
|
-
self.graph_image = customtkinter.CTkImage(self.graph_image_obj, size=(self.image_width, self.image_height))
|
|
221
|
-
self.graph_label.configure(image=self.graph_image)
|
|
222
210
|
elif (selected_graph == "Iteration Table"):
|
|
223
211
|
self.selected_graph_name = "table"
|
|
224
|
-
image_path = os.path.join(folder, self.selected_graph_name + ".png")
|
|
225
|
-
if not os.path.exists(image_path):
|
|
226
|
-
image_path = os.path.join("./images", "up.png")
|
|
227
|
-
self.graph_image_obj = Image.open(image_path)
|
|
228
|
-
self.graph_image = customtkinter.CTkImage(self.graph_image_obj, size=(self.image_width, self.image_height))
|
|
229
|
-
self.graph_label.configure(image=self.graph_image)
|
|
230
212
|
elif (selected_graph == "Calibrated Parameters"):
|
|
231
213
|
self.selected_graph_name = "calibrated_params_by_round"
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
214
|
+
|
|
215
|
+
image_path = os.path.join(folder, self.selected_graph_name + ".png")
|
|
216
|
+
if not os.path.exists(image_path):
|
|
217
|
+
image_path = os.path.join("./images", "up.png")
|
|
218
|
+
self.graph_image_obj = Image.open(image_path)
|
|
219
|
+
self.graph_image = customtkinter.CTkImage(self.graph_image_obj, size=(self.image_width * self.image_scale, self.image_height * self.image_scale))
|
|
220
|
+
self.graph_label.configure(image=self.graph_image)
|
|
238
221
|
|
|
239
222
|
def save_project(self):
|
|
240
223
|
metrics = self.option_manager.get_metrics()
|
|
224
|
+
|
|
225
|
+
# Add the calibration_progress dataframe to the json
|
|
226
|
+
if (self.progress_data is not None):
|
|
227
|
+
metrics["calibration_progress"] = self.progress_data.to_json()
|
|
228
|
+
# Add the calibration_data to the json
|
|
229
|
+
if (self.calibration_data is not None):
|
|
230
|
+
metrics["calibration_data"] = self.calibration_data
|
|
231
|
+
|
|
241
232
|
filename = asksaveasfilename(filetypes=[("JSON", "*.json")], initialfile="config", defaultextension="json", title="Save Project")
|
|
242
233
|
|
|
243
234
|
try:
|
|
@@ -276,6 +267,13 @@ class App(customtkinter.CTk):
|
|
|
276
267
|
if "service_parameters" in metrics:
|
|
277
268
|
self.option_manager.set_service_parameters(metrics["service_parameters"])
|
|
278
269
|
self.tabview.configure(state="enabled")
|
|
270
|
+
|
|
271
|
+
if "calibration_progress" in metrics:
|
|
272
|
+
self.progress_data = pd.read_json(metrics["calibration_progress"])
|
|
273
|
+
self.calibration_data = metrics["calibration_data"]
|
|
274
|
+
|
|
275
|
+
if "calibration_data" in metrics:
|
|
276
|
+
self.calibration_data = metrics["calibration_data"]
|
|
279
277
|
|
|
280
278
|
print(metrics)
|
|
281
279
|
|
|
@@ -493,9 +491,11 @@ class App(customtkinter.CTk):
|
|
|
493
491
|
best_particle_values = [ast.literal_eval(i) for i in best_particle_values]
|
|
494
492
|
progress_values = [tuple(map(float, i)) for i in progress_values]
|
|
495
493
|
|
|
496
|
-
print("Current params: " + str(calibrated_params), flush=True)
|
|
494
|
+
#print("Current params: " + str(calibrated_params), flush=True)
|
|
495
|
+
|
|
496
|
+
self.calibration_data = calibrated_params
|
|
497
497
|
|
|
498
|
-
GraphGenerator.calibrated_params_by_round(self.running_config['steps'], calibrated_params, self.option_manager)
|
|
498
|
+
#GraphGenerator.calibrated_params_by_round(self.running_config['steps'], calibrated_params, self.option_manager)
|
|
499
499
|
self.update_graph("")
|
|
500
500
|
except Exception as e:
|
|
501
501
|
# Print stack trace
|
|
@@ -521,11 +521,13 @@ class App(customtkinter.CTk):
|
|
|
521
521
|
df = df.drop_duplicates()
|
|
522
522
|
df['round_step'] = (df['completed_rounds'].diff() < 0).cumsum()
|
|
523
523
|
df = df.drop_duplicates(subset=['completed_rounds', 'round_step'])
|
|
524
|
+
self.progress_data = df
|
|
524
525
|
|
|
525
|
-
GraphGenerator.
|
|
526
|
-
GraphGenerator.
|
|
527
|
-
GraphGenerator.
|
|
528
|
-
self.
|
|
526
|
+
#GraphGenerator.update_progress_graphs(self.running_config['steps'], self.current_data, self.option_manager)
|
|
527
|
+
#GraphGenerator.best_cost_stacked(self.running_config['steps'], df, self.option_manager)
|
|
528
|
+
#GraphGenerator.best_cost_by_round(self.running_config['steps'], df, self.option_manager)
|
|
529
|
+
#GraphGenerator.table(self.running_config['steps'], df, self.option_manager)
|
|
530
|
+
#self.update_graph("")
|
|
529
531
|
|
|
530
532
|
match = matches[-1]
|
|
531
533
|
percent = int(match[0])
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|