mg-pso-gui 0.1.116__py3-none-any.whl → 0.1.118__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.116.dist-info → mg_pso_gui-0.1.118.dist-info}/METADATA +1 -1
- {mg_pso_gui-0.1.116.dist-info → mg_pso_gui-0.1.118.dist-info}/RECORD +7 -7
- mgpsogui/gui/HomePage.py +18 -66
- mgpsogui/util/PSORunner.py +1 -1
- {mg_pso_gui-0.1.116.dist-info → mg_pso_gui-0.1.118.dist-info}/WHEEL +0 -0
- {mg_pso_gui-0.1.116.dist-info → mg_pso_gui-0.1.118.dist-info}/entry_points.txt +0 -0
- {mg_pso_gui-0.1.116.dist-info → mg_pso_gui-0.1.118.dist-info}/top_level.txt +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
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=
|
|
4
|
+
mgpsogui/gui/HomePage.py,sha256=AqSNY9NDdIVcjNKtu4aAKbQiWPXWzHSH9tJNVq_zjsE,22562
|
|
5
5
|
mgpsogui/gui/OptionManager.py,sha256=H5ofd7PA5f6dVfSghUhKdPiqLHNE0IVpPPzf93k7JD4,12527
|
|
6
6
|
mgpsogui/gui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
mgpsogui/gui/PlatformTab/PlatformTab.py,sha256=KyIoHlMKD9nfQqHeGJwRDA4RCoe4UykjB2l6xMTKK_M,10486
|
|
@@ -33,7 +33,7 @@ mgpsogui/gui/images/test.png,sha256=MUnVpRK-isxhEHzx4Q6Yh0M6FRZD1qvgCHH2XmiSBbk,
|
|
|
33
33
|
mgpsogui/gui/images/trash.png,sha256=j8cf0kWbJd-4Jp20lUVV1o1NSeQ4v1Ej4gfcIA3DVRQ,2958
|
|
34
34
|
mgpsogui/gui/images/up.png,sha256=AQvFWCUqSQNaQ1E6LKZ9zNfSvW6t4mgy8uswdg9T2Hg,2457
|
|
35
35
|
mgpsogui/util/GraphGenerator.py,sha256=HhUsFUFhCv3wTYV8CTqU0wo56Ph9c1DocPj25AVIAdI,15076
|
|
36
|
-
mgpsogui/util/PSORunner.py,sha256=
|
|
36
|
+
mgpsogui/util/PSORunner.py,sha256=ZXFpfL1U8PxRwMDtuHmXHdJclzounq0mCJ0YOVEBtm4,3934
|
|
37
37
|
mgpsogui/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
38
38
|
mgpsogui/util/debug.py,sha256=36oZ3wf3_zGQbdZLGwHJ1Kk8QArl9pjNqkIaz6IPt74,19742
|
|
39
39
|
mgpsogui/util/helpers.py,sha256=fCfVDaGholx16FVVqf2BhWs9KCevI7aFIve1w2W68EQ,769
|
|
@@ -49,8 +49,8 @@ mgpsogui/util/recosu/utils/trace_writer.py,sha256=V9BJlOjCbNYGoXGEk3CF5wjifBxvar
|
|
|
49
49
|
mgpsogui/util/recosu/utils/utils.py,sha256=QB8vftq3142ekG0ORjz0ZBHU5YknXbR0oTsrxrPAsF0,3951
|
|
50
50
|
mgpsogui/util/recosu/utils/plot/__init__.py,sha256=h1KjM7_tNDv351pcwt8A6Ibb1jhwWyx5Gbu-zj-sI3Q,71
|
|
51
51
|
mgpsogui/util/recosu/utils/plot/cost_steps.py,sha256=1Ce11AJyweWkmvjXPxEygzS-h8yVLmQEDLS53yjPLqQ,3779
|
|
52
|
-
mg_pso_gui-0.1.
|
|
53
|
-
mg_pso_gui-0.1.
|
|
54
|
-
mg_pso_gui-0.1.
|
|
55
|
-
mg_pso_gui-0.1.
|
|
56
|
-
mg_pso_gui-0.1.
|
|
52
|
+
mg_pso_gui-0.1.118.dist-info/METADATA,sha256=HecEFv_X6j2ia2lewYOJapHllNStBybzS3PAXrXhpN8,9460
|
|
53
|
+
mg_pso_gui-0.1.118.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
54
|
+
mg_pso_gui-0.1.118.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
|
|
55
|
+
mg_pso_gui-0.1.118.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
|
|
56
|
+
mg_pso_gui-0.1.118.dist-info/RECORD,,
|
mgpsogui/gui/HomePage.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/usr/local/bin/python3.
|
|
1
|
+
#!/usr/local/bin/python3.10
|
|
2
2
|
|
|
3
3
|
import os
|
|
4
4
|
import time
|
|
@@ -69,7 +69,7 @@ class App(customtkinter.CTk):
|
|
|
69
69
|
self.selected_csv.set("No files found...")
|
|
70
70
|
self.open_file = "None"
|
|
71
71
|
self.csv_data = None
|
|
72
|
-
|
|
72
|
+
|
|
73
73
|
self.selected_csv2 = tk.StringVar()
|
|
74
74
|
self.selected_csv2.set("No files found...")
|
|
75
75
|
self.open_file2 = "None"
|
|
@@ -98,7 +98,7 @@ class App(customtkinter.CTk):
|
|
|
98
98
|
self.progress_data = None
|
|
99
99
|
self.calibration_data = None
|
|
100
100
|
self.testing = False
|
|
101
|
-
|
|
101
|
+
|
|
102
102
|
# configure window
|
|
103
103
|
self.title("CSIP PSO")
|
|
104
104
|
self.geometry(f"{1920}x{1080}")
|
|
@@ -129,18 +129,22 @@ class App(customtkinter.CTk):
|
|
|
129
129
|
self.refresh_button = customtkinter.CTkButton(self.sidebar_frame, text=None, width=30, image=refresh_image, command=self.load)
|
|
130
130
|
ctt(self.refresh_button, delay=0.1, alpha=0.95, message="Connect to Service")
|
|
131
131
|
self.refresh_button.grid(row=0, column=5, padx=(5, 80), pady=header_padding_y)
|
|
132
|
+
|
|
133
|
+
self.algorithm_optionmenu = customtkinter.CTkOptionMenu(self.sidebar_frame, variable=self.option_manager.get_arguments()['mode'], values=["Optimization: MG-PSO", "Sampling: Halton", "Sampling: Random"], width=50, command=self.refresh_step_view)
|
|
134
|
+
self.algorithm_optionmenu.grid(row=0, column=6, padx=header_padding_x, pady=header_padding_y)
|
|
135
|
+
self.algorithm_optionmenu.set("Optimization: MG-PSO")
|
|
132
136
|
|
|
133
137
|
self.scaling_label = customtkinter.CTkLabel(self.sidebar_frame, text="Scale:", anchor="w")
|
|
134
|
-
self.scaling_label.grid(row=0, column=
|
|
138
|
+
self.scaling_label.grid(row=0, column=7, padx=header_padding_x, pady=header_padding_y)
|
|
135
139
|
self.scaling_optionemenu = customtkinter.CTkOptionMenu(self.sidebar_frame, values=["50%", "75%", "100%", "125%", "150%", "175%", "200%"], width=60,
|
|
136
|
-
|
|
137
|
-
self.scaling_optionemenu.grid(row=0, column=
|
|
140
|
+
command=self.change_scaling_event)
|
|
141
|
+
self.scaling_optionemenu.grid(row=0, column=8, padx=header_padding_x, pady=header_padding_y)
|
|
138
142
|
self.scaling_optionemenu.set("100%")
|
|
139
143
|
|
|
140
144
|
expand_image = customtkinter.CTkImage(Image.open(os.path.join("./images", "expand.png")), size=(20, 20))
|
|
141
145
|
self.new_window = customtkinter.CTkButton(self.sidebar_frame, text=None, width=30, image=expand_image, command=self.open_new_window)
|
|
142
146
|
ctt(self.new_window, delay=0.1, alpha=0.95, message="Open New Window")
|
|
143
|
-
self.new_window.grid(row=0, column=
|
|
147
|
+
self.new_window.grid(row=0, column=9, padx=(5, 20), pady=header_padding_y)
|
|
144
148
|
|
|
145
149
|
self.tabview = customtkinter.CTkTabview(self, bg_color="transparent", fg_color="transparent")
|
|
146
150
|
self.tabview.grid(row=1, column=0, padx=(0, 0), pady=(10, 10), sticky="nsew")
|
|
@@ -148,15 +152,11 @@ class App(customtkinter.CTk):
|
|
|
148
152
|
tab2 = "Setup"
|
|
149
153
|
tab3 = "Logs"
|
|
150
154
|
tab4 = "Results"
|
|
151
|
-
#tab5 = "Results"
|
|
152
155
|
|
|
153
156
|
self.tabview.add(tab1)
|
|
154
157
|
self.tabview.add(tab2)
|
|
155
158
|
self.tabview.add(tab4)
|
|
156
159
|
self.tabview.add(tab3)
|
|
157
|
-
#self.tabview.add(tab5)
|
|
158
|
-
|
|
159
|
-
#self.tabview.configure(state="disabled")
|
|
160
160
|
|
|
161
161
|
pt.create_tab(self, self.tabview.tab(tab1))
|
|
162
162
|
st.create_tab(self, self.tabview.tab(tab2))
|
|
@@ -173,10 +173,6 @@ class App(customtkinter.CTk):
|
|
|
173
173
|
self.footer_progress_bar = customtkinter.CTkProgressBar(self.footer_frame)
|
|
174
174
|
self.footer_progress_bar.grid(row=0, column=4, padx=(50, 100), pady=header_padding_y, sticky="ew")
|
|
175
175
|
self.footer_progress_bar.set(0)
|
|
176
|
-
|
|
177
|
-
self.algorithm_optionmenu = customtkinter.CTkOptionMenu(self.footer_frame, variable=self.option_manager.get_arguments()['mode'], values=["PSO", "Halton"], width=50, command=self.refresh_step_view)
|
|
178
|
-
self.algorithm_optionmenu.grid(row=0, column=6, padx=header_padding_x, pady=header_padding_y)
|
|
179
|
-
self.algorithm_optionmenu.set("PSO")
|
|
180
176
|
|
|
181
177
|
play_image = customtkinter.CTkImage(Image.open(os.path.join("./images", "play.png")), size=(20, 20))
|
|
182
178
|
self.run_button = customtkinter.CTkButton(self.footer_frame, text=None, width=30, image=play_image, command=self.run)
|
|
@@ -203,55 +199,10 @@ class App(customtkinter.CTk):
|
|
|
203
199
|
def update_graph(self, value):
|
|
204
200
|
self.vis_sidebar.refresh()
|
|
205
201
|
GraphGenerator.generate_graphs(self)
|
|
206
|
-
|
|
207
|
-
'''def _resize_image(self, event):
|
|
208
|
-
self.graph_label.update_idletasks()
|
|
209
|
-
new_width = self.graph_label.winfo_width()
|
|
210
|
-
new_height = self.graph_label.winfo_height()
|
|
211
|
-
|
|
212
|
-
alt_width = new_height * 1.77778
|
|
213
|
-
alt_height = new_width / 1.77778
|
|
214
|
-
|
|
215
|
-
if (new_width < new_height):
|
|
216
|
-
new_height = alt_height
|
|
217
|
-
else:
|
|
218
|
-
new_width = alt_width
|
|
219
|
-
|
|
220
|
-
self.image_width = new_width
|
|
221
|
-
self.image_height = new_height
|
|
222
|
-
|
|
223
|
-
self.graph_image = customtkinter.CTkImage(self.graph_image_obj, size=(new_width, new_height))
|
|
224
|
-
self.graph_label.configure(image=self.graph_image)
|
|
225
|
-
self.graph_label.update_idletasks()
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
def update_graph(self, value):
|
|
229
|
-
selected_graph = self.graph_selector_value.get()
|
|
230
|
-
info = self.option_manager.get_project_data()
|
|
231
|
-
folder = os.path.join(info['path'], info['name'])
|
|
232
|
-
|
|
233
|
-
if not os.path.exists(folder):
|
|
234
|
-
os.makedirs(folder)
|
|
235
|
-
|
|
236
|
-
if (selected_graph == "Best Cost Stacked"):
|
|
237
|
-
self.selected_graph_name = "best_cost_stacked"
|
|
238
|
-
elif (selected_graph == "Best Cost by Round"):
|
|
239
|
-
self.selected_graph_name = "best_cost_by_round"
|
|
240
|
-
elif (selected_graph == "Iteration Table"):
|
|
241
|
-
self.selected_graph_name = "table"
|
|
242
|
-
elif (selected_graph == "Calibrated Parameters"):
|
|
243
|
-
self.selected_graph_name = "calibrated_params_by_round"
|
|
244
|
-
|
|
245
|
-
image_path = os.path.join(folder, self.selected_graph_name + ".png")
|
|
246
|
-
if not os.path.exists(image_path):
|
|
247
|
-
image_path = os.path.join("./images", "up.png")
|
|
248
|
-
self.graph_image_obj = Image.open(image_path)
|
|
249
|
-
self.graph_image = customtkinter.CTkImage(self.graph_image_obj, size=(self.image_width * self.image_scale, self.image_height * self.image_scale))
|
|
250
|
-
self.graph_label.configure(image=self.graph_image)'''
|
|
251
202
|
|
|
252
203
|
def save_project(self):
|
|
253
204
|
metrics = self.option_manager.get_metrics()
|
|
254
|
-
|
|
205
|
+
|
|
255
206
|
# Add the calibration_progress dataframe to the json
|
|
256
207
|
if (self.progress_data is not None):
|
|
257
208
|
metrics["calibration_progress"] = self.progress_data.to_json()
|
|
@@ -279,7 +230,7 @@ class App(customtkinter.CTk):
|
|
|
279
230
|
self.steps_frame.render()
|
|
280
231
|
self.optimal_param_frame.clear()
|
|
281
232
|
self.optimal_param_frame.render()
|
|
282
|
-
|
|
233
|
+
|
|
283
234
|
def open_new_window(self):
|
|
284
235
|
# Shell out and run ./main.py
|
|
285
236
|
subprocess.Popen(["python3", "../mgpsogui.py"])
|
|
@@ -389,7 +340,7 @@ class App(customtkinter.CTk):
|
|
|
389
340
|
def run_test(self):
|
|
390
341
|
self.testing = True
|
|
391
342
|
self.run()
|
|
392
|
-
|
|
343
|
+
|
|
393
344
|
def run(self):
|
|
394
345
|
metrics = self.option_manager.get_metrics()
|
|
395
346
|
self.running_config = metrics
|
|
@@ -400,7 +351,7 @@ class App(customtkinter.CTk):
|
|
|
400
351
|
for param in step['param']:
|
|
401
352
|
param['default_value'] = param['optimal_value']
|
|
402
353
|
self.testing = False
|
|
403
|
-
|
|
354
|
+
|
|
404
355
|
self.progress_data = None
|
|
405
356
|
self.calibration_data = None
|
|
406
357
|
|
|
@@ -525,10 +476,10 @@ class App(customtkinter.CTk):
|
|
|
525
476
|
trace = results_queue.get_nowait()
|
|
526
477
|
|
|
527
478
|
print("TRACE " + str(trace), flush=True)
|
|
528
|
-
|
|
479
|
+
|
|
529
480
|
final_results = hp.extract_final_round_values(trace)
|
|
530
481
|
print("Final results: " + str(final_results), flush=True)
|
|
531
|
-
|
|
482
|
+
|
|
532
483
|
all_steps = self.option_manager.get_steps()
|
|
533
484
|
data = final_results["data"]
|
|
534
485
|
index = 0
|
|
@@ -560,6 +511,7 @@ class App(customtkinter.CTk):
|
|
|
560
511
|
print(new_characters, end="")
|
|
561
512
|
|
|
562
513
|
try:
|
|
514
|
+
# REPLACE THIS WITH READING THE STEP TRACE JSON for PSO
|
|
563
515
|
with open(os.path.join(folder, "output.txt"), "r") as f:
|
|
564
516
|
text = f.read()
|
|
565
517
|
|
mgpsogui/util/PSORunner.py
CHANGED
|
@@ -73,7 +73,7 @@ def run_process(stdout_queue, stderr_queue, results_queue, data, folder):
|
|
|
73
73
|
'http_conn_timeout': int(calibration_map['conn_timeout']),
|
|
74
74
|
'http_read_timeout': int(calibration_map['read_timeout']),
|
|
75
75
|
'particles_fail': int(calibration_map['particles_fail']),
|
|
76
|
-
'step_trace': os.path.join(folder, '
|
|
76
|
+
'step_trace': os.path.join(folder, 'pso_step_trace.json')
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
print("\n")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|