mg-pso-gui 0.1.116__tar.gz → 0.1.119__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.
Files changed (60) hide show
  1. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/PKG-INFO +1 -1
  2. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mg_pso_gui.egg-info/PKG-INFO +1 -1
  3. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/gui/HomePage.py +19 -67
  4. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/gui/OptionManager.py +1 -1
  5. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/gui/SetupTab/OptimalParameterView.py +2 -7
  6. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/gui/SetupTab/StepView.py +4 -4
  7. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/util/PSORunner.py +1 -1
  8. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/util/debug.py +1 -1
  9. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/setup.py +1 -1
  10. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mg_pso_gui.egg-info/SOURCES.txt +0 -0
  11. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mg_pso_gui.egg-info/dependency_links.txt +0 -0
  12. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mg_pso_gui.egg-info/entry_points.txt +0 -0
  13. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mg_pso_gui.egg-info/requires.txt +0 -0
  14. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mg_pso_gui.egg-info/top_level.txt +0 -0
  15. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/__init__.py +0 -0
  16. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/gui/PlatformTab/PlatformTab.py +0 -0
  17. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/gui/PlatformTab/__init__.py +0 -0
  18. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/gui/RunTab/RunTab.py +0 -0
  19. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/gui/RunTab/__init__.py +0 -0
  20. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/gui/SetupTab/BoundsEditorWindow.py +0 -0
  21. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/gui/SetupTab/BoundsList.py +0 -0
  22. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/gui/SetupTab/CalibrationParametersView.py +0 -0
  23. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/gui/SetupTab/FunctionsList.py +0 -0
  24. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/gui/SetupTab/ListParametersView.py +0 -0
  25. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/gui/SetupTab/SetupTab.py +0 -0
  26. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/gui/SetupTab/StaticParameterView.py +0 -0
  27. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/gui/SetupTab/__init__.py +0 -0
  28. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/gui/VisualizeTab/SideBar.py +0 -0
  29. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/gui/VisualizeTab/VisualizeTab.py +0 -0
  30. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/gui/VisualizeTab/__init__.py +0 -0
  31. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/gui/__init__.py +0 -0
  32. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/gui/images/IGOW 4 Logo.png +0 -0
  33. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/gui/images/collapse.png +0 -0
  34. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/gui/images/down.png +0 -0
  35. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/gui/images/expand.png +0 -0
  36. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/gui/images/play.png +0 -0
  37. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/gui/images/refresh.png +0 -0
  38. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/gui/images/refresh_hd.png +0 -0
  39. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/gui/images/stop.png +0 -0
  40. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/gui/images/test.png +0 -0
  41. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/gui/images/trash.png +0 -0
  42. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/gui/images/up.png +0 -0
  43. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/mgpsogui.py +0 -0
  44. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/start.yaml +0 -0
  45. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/util/CTkToolTip/__init__.py +0 -0
  46. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/util/CTkToolTip/ctk_tooltip.py +0 -0
  47. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/util/GraphGenerator.py +0 -0
  48. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/util/__init__.py +0 -0
  49. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/util/helpers.py +0 -0
  50. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/util/recosu/__init__.py +0 -0
  51. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/util/recosu/pso/__init__.py +0 -0
  52. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/util/recosu/pso/csip_access.py +0 -0
  53. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/util/recosu/pso/pso.py +0 -0
  54. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/util/recosu/utils/__init__.py +0 -0
  55. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/util/recosu/utils/plot/__init__.py +0 -0
  56. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/util/recosu/utils/plot/cost_steps.py +0 -0
  57. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/util/recosu/utils/trace_writer.py +0 -0
  58. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/util/recosu/utils/utils.py +0 -0
  59. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/mgpsogui/util/sampler_test_driver.py +0 -0
  60. {mg-pso-gui-0.1.116 → mg-pso-gui-0.1.119}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mg-pso-gui
3
- Version: 0.1.116
3
+ Version: 0.1.119
4
4
  Summary: GUI for MG-PSO
5
5
  Author: Robert Cordingly
6
6
  Author-email: <rcording@uw.ed>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mg-pso-gui
3
- Version: 0.1.116
3
+ Version: 0.1.119
4
4
  Summary: GUI for MG-PSO
5
5
  Author: Robert Cordingly
6
6
  Author-email: <rcording@uw.ed>
@@ -1,4 +1,4 @@
1
- #!/usr/local/bin/python3.9
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}")
@@ -128,19 +128,23 @@ class App(customtkinter.CTk):
128
128
  refresh_image = customtkinter.CTkImage(Image.open(os.path.join("./images", "refresh.png")), size=(20, 20))
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
- self.refresh_button.grid(row=0, column=5, padx=(5, 80), pady=header_padding_y)
131
+ self.refresh_button.grid(row=0, column=5, padx=header_padding_x, 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=(5, 80), 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=6, padx=header_padding_x, pady=header_padding_y)
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
- command=self.change_scaling_event)
137
- self.scaling_optionemenu.grid(row=0, column=7, padx=header_padding_x, pady=header_padding_y)
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=8, padx=(5, 20), pady=header_padding_y)
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
 
@@ -20,7 +20,7 @@ class OptionManager():
20
20
  def clear(self):
21
21
  self.arguments['param'].clear()
22
22
  self.arguments['url'].set("")
23
- self.arguments['mode'].set("PSO")
23
+ self.arguments['mode'].set("Optimization: MG-PSO")
24
24
  self.arguments['files'] = {}
25
25
  self.arguments['calibration_parameters'].clear()
26
26
  self.steps = []
@@ -28,16 +28,11 @@ class OptimalParameterView(CTkScrollableFrame):
28
28
  self.containerFrame.grid_columnconfigure((0, 1), weight=1)
29
29
 
30
30
  self.mode = self.option_manager.get_arguments()['mode'].get()
31
-
32
- #CTkLabel(self.containerFrame, text="Name:").grid(row=row, column=0, columnspan=1, padx=5, pady=5, sticky="")
33
- #CTkLabel(self.containerFrame, text="Value:").grid(row=row, column=1, columnspan=1, padx=5, pady=5, sticky="")
34
- #row += 1
35
-
36
31
  self.steps = self.option_manager.get_steps()
37
32
 
38
33
  for step in self.steps:
39
34
 
40
- if self.mode != "Halton":
35
+ if self.mode != "Sampling: Halton":
41
36
  name = step['name'].get()
42
37
  CTkLabel(self.containerFrame, text=name).grid(row=row, column=0, columnspan=1, padx=5, pady=5, sticky="")
43
38
  row += 1
@@ -50,5 +45,5 @@ class OptimalParameterView(CTkScrollableFrame):
50
45
  bb.configure(textvariable=param['optimal_value'])
51
46
  row += 1
52
47
 
53
- if self.mode == "Halton":
48
+ if self.mode == "Sampling: Halton":
54
49
  break
@@ -86,7 +86,7 @@ class StepView(CTkScrollableFrame):
86
86
 
87
87
  #CTkLabel(self.containerFrame, text="Step:").grid(row=row, column=0, padx=10, pady=5, sticky="nsew")
88
88
 
89
- if (self.mode == "PSO"):
89
+ if (self.mode == "Optimization: MG-PSO"):
90
90
  button_container = CTkFrame(self.containerFrame, width=200)
91
91
  button_container.grid(row=row, column=1, sticky="nse", padx=(10, 10), pady=(10, 10))
92
92
  button_container.grid_rowconfigure(0, weight=1)
@@ -102,7 +102,7 @@ class StepView(CTkScrollableFrame):
102
102
 
103
103
  row += 1
104
104
 
105
- if step['open'] or self.mode == "Halton":
105
+ if step['open'] or self.mode == "Sampling: Halton":
106
106
  bounds = BoundsList.BoundsList(
107
107
  self.containerFrame, option_manager=self.option_manager, step_index=index)
108
108
  bounds.grid(row=row, column=0, padx=(10, 10),
@@ -120,11 +120,11 @@ class StepView(CTkScrollableFrame):
120
120
  row += 1
121
121
  index += 1
122
122
 
123
- if (self.mode != "PSO"):
123
+ if (self.mode != "Optimization: MG-PSO"):
124
124
  break
125
125
 
126
126
  # Create an "Add step button that is centered
127
127
 
128
- if (self.mode == "PSO" or len(self.steps) == 0):
128
+ if (self.mode == "Optimization: MG-PSO" or len(self.steps) == 0):
129
129
  CTkButton(self.containerFrame, text="Add Group", command=self.create_new_step).grid(
130
130
  row=row, columnspan=2, column=0, padx=(10, 10), pady=(10, 10), sticky="ew")
@@ -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, 'step_trace.json')
76
+ 'step_trace': os.path.join(folder, 'pso_step_trace.json')
77
77
  }
78
78
 
79
79
  print("\n")
@@ -136,7 +136,7 @@ args = {
136
136
  {"name": "project", "value": "SFIR3"},
137
137
  ],
138
138
  "url": "http://csip.engr.colostate.edu:8087/csip-oms/m/ages/0.3.0",
139
- "mode": "PSO",
139
+ "mode": "Optimization: MG-PSO",
140
140
  "files": {},
141
141
  }
142
142
 
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
  import codecs
3
3
  import os
4
4
 
5
- VERSION = '0.1.116'
5
+ VERSION = '0.1.119'
6
6
  DESCRIPTION = 'GUI for MG-PSO'
7
7
  LONG_DESCRIPTION = open('../README.md').read()
8
8
 
File without changes