mg-pso-gui 0.1.143__tar.gz → 0.1.145__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 (69) hide show
  1. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/PKG-INFO +1 -1
  2. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mg_pso_gui.egg-info/PKG-INFO +1 -1
  3. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/gui/HomePage.py +25 -68
  4. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/util/helpers.py +0 -2
  5. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/setup.py +1 -1
  6. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mg_pso_gui.egg-info/SOURCES.txt +0 -0
  7. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mg_pso_gui.egg-info/dependency_links.txt +0 -0
  8. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mg_pso_gui.egg-info/entry_points.txt +0 -0
  9. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mg_pso_gui.egg-info/requires.txt +0 -0
  10. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mg_pso_gui.egg-info/top_level.txt +0 -0
  11. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/__init__.py +0 -0
  12. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/gui/OptionManager.py +0 -0
  13. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/gui/PlatformTab/PlatformTab.py +0 -0
  14. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/gui/PlatformTab/__init__.py +0 -0
  15. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/gui/RunTab/RunTab.py +0 -0
  16. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/gui/RunTab/__init__.py +0 -0
  17. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/gui/SetupTab/BoundsEditorWindow.py +0 -0
  18. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/gui/SetupTab/BoundsList.py +0 -0
  19. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/gui/SetupTab/CalibrationParametersView.py +0 -0
  20. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/gui/SetupTab/FunctionsList.py +0 -0
  21. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/gui/SetupTab/ListParametersView.py +0 -0
  22. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/gui/SetupTab/OptimalParameterView.py +0 -0
  23. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/gui/SetupTab/SetupTab.py +0 -0
  24. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/gui/SetupTab/StaticParameterView.py +0 -0
  25. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/gui/SetupTab/StepView.py +0 -0
  26. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/gui/SetupTab/__init__.py +0 -0
  27. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/gui/VisualizeTab/SideBar.py +0 -0
  28. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/gui/VisualizeTab/VisualizeTab.py +0 -0
  29. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/gui/VisualizeTab/__init__.py +0 -0
  30. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/gui/__init__.py +0 -0
  31. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/gui/images/IGOW 4 Logo.png +0 -0
  32. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/gui/images/collapse.png +0 -0
  33. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/gui/images/down.png +0 -0
  34. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/gui/images/expand.png +0 -0
  35. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/gui/images/play.png +0 -0
  36. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/gui/images/refresh.png +0 -0
  37. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/gui/images/refresh_hd.png +0 -0
  38. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/gui/images/stop.png +0 -0
  39. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/gui/images/test.png +0 -0
  40. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/gui/images/trash.png +0 -0
  41. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/gui/images/up.png +0 -0
  42. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/mgpsogui.py +0 -0
  43. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/start.yaml +0 -0
  44. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/util/CTkToolTip/__init__.py +0 -0
  45. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/util/CTkToolTip/ctk_tooltip.py +0 -0
  46. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/util/GraphGenerator.py +0 -0
  47. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/util/PSORunner.py +0 -0
  48. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/util/__init__.py +0 -0
  49. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/util/debug.py +0 -0
  50. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/util/recosu/__init__.py +0 -0
  51. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/util/recosu/pso/__init__.py +0 -0
  52. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/util/recosu/pso/csip_access.py +0 -0
  53. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/util/recosu/pso/pso.py +0 -0
  54. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/util/recosu/sampling/__init__.py +0 -0
  55. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/util/recosu/sampling/halton/__init__.py +0 -0
  56. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/util/recosu/sampling/halton/halton.py +0 -0
  57. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/util/recosu/sampling/halton/prime.py +0 -0
  58. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/util/recosu/sampling/random/__init__.py +0 -0
  59. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/util/recosu/sampling/random/random_sampler.py +0 -0
  60. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/util/recosu/sampling/sample_trace_writer.py +0 -0
  61. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/util/recosu/sampling/sampler_task.py +0 -0
  62. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/util/recosu/sampling/sampling.py +0 -0
  63. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/util/recosu/utils/__init__.py +0 -0
  64. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/util/recosu/utils/plot/__init__.py +0 -0
  65. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/util/recosu/utils/plot/cost_steps.py +0 -0
  66. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/util/recosu/utils/trace_writer.py +0 -0
  67. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/util/recosu/utils/utils.py +0 -0
  68. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/mgpsogui/util/sampler_test_driver.py +0 -0
  69. {mg-pso-gui-0.1.143 → mg-pso-gui-0.1.145}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mg-pso-gui
3
- Version: 0.1.143
3
+ Version: 0.1.145
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.143
3
+ Version: 0.1.145
4
4
  Summary: GUI for MG-PSO
5
5
  Author: Robert Cordingly
6
6
  Author-email: <rcording@uw.ed>
@@ -176,7 +176,7 @@ class App(customtkinter.CTk):
176
176
 
177
177
  play_image = customtkinter.CTkImage(Image.open(os.path.join("./images", "play.png")), size=(20, 20))
178
178
  self.run_button = customtkinter.CTkButton(self.footer_frame, text=None, width=30, image=play_image, command=self.run)
179
- ctt(self.run_button, delay=0.1, alpha=0.95, message="Start Calibration")
179
+ ctt(self.run_button, delay=0.1, alpha=0.95, message="Start Job")
180
180
  self.run_button.grid(row=0, column=7, padx=(20, 5), pady=header_padding_y)
181
181
 
182
182
  test_image = customtkinter.CTkImage(Image.open(os.path.join("./images", "test.png")), size=(20, 20))
@@ -226,6 +226,13 @@ class App(customtkinter.CTk):
226
226
  self.after(3000, lambda: self.save_button.configure(text="Save"))
227
227
 
228
228
  def refresh_step_view(self, value):
229
+ mode = self.option_manager.get_arguments()['mode'].get()
230
+
231
+ if mode == "Optimization: MG-PSO":
232
+ self.test_button.configure(state="enabled")
233
+ else:
234
+ self.test_button.configure(state="disabled")
235
+
229
236
  self.steps_frame.clear()
230
237
  self.steps_frame.render()
231
238
  self.optimal_param_frame.clear()
@@ -366,11 +373,11 @@ class App(customtkinter.CTk):
366
373
  self.data_x = [0]
367
374
  self.data_y = [0]
368
375
 
369
- self.progress_message_middle.configure(text="Calibration starting...")
376
+ self.progress_message_middle.configure(text="Job starting...")
370
377
  self.footer_progress_label.configure(text="Starting...")
371
378
 
372
- self.textbox.insert("0.0", "Starting calibration...\n\n")
373
- self.textbox.insert("0.0", "Calibration Parameters:\n")
379
+ self.textbox.insert("0.0", "Starting job...\n\n")
380
+ self.textbox.insert("0.0", "Job Parameters:\n")
374
381
  self.textbox.insert("0.0", json.dumps(metrics, indent=4) + "\n\n")
375
382
  try:
376
383
  info = self.option_manager.get_project_data()
@@ -397,9 +404,9 @@ class App(customtkinter.CTk):
397
404
  self.textbox.insert("0.0", "Stack trace:\n")
398
405
  self.textbox.insert("0.0", traceback.format_exc())
399
406
  self.textbox.insert("0.0", "\n\n")
400
- self.textbox.insert("0.0", "Calibration failed!")
407
+ self.textbox.insert("0.0", "Job failed!")
401
408
  self.progress_message_left.configure(text="")
402
- self.progress_message_middle.configure(text="Calibration failed! See error log below.")
409
+ self.progress_message_middle.configure(text="Job failed! See error log below.")
403
410
  self.progress_message_right.configure(text="")
404
411
  self.footer_progress_label.configure(text="Failed")
405
412
  #self.progress_bar.stop()
@@ -426,7 +433,7 @@ class App(customtkinter.CTk):
426
433
  if (os.path.exists(os.path.join(folder, 'error.txt'))):
427
434
  os.remove(os.path.join(folder, 'error.txt'))
428
435
 
429
- self.textbox.insert("0.0", "\nCalibration terminated!\n")
436
+ self.textbox.insert("0.0", "\Job terminated!\n")
430
437
  #self.progress_bar.stop()
431
438
  self.footer_progress_bar.stop()
432
439
  #self.progress_bar.configure(mode="determinate")
@@ -434,7 +441,7 @@ class App(customtkinter.CTk):
434
441
  #self.progress_bar.set(0)
435
442
  self.footer_progress_bar.set(0)
436
443
  self.progress_message_left.configure(text="")
437
- self.progress_message_middle.configure(text="Calibration stopped!")
444
+ self.progress_message_middle.configure(text="Job stopped!")
438
445
  self.footer_progress_label.configure(text="Stopped")
439
446
  self.progress_message_right.configure(text="")
440
447
 
@@ -544,73 +551,23 @@ class App(customtkinter.CTk):
544
551
  traceback.print_exc()
545
552
  print(e)
546
553
 
547
- if (os.path.exists(os.path.join(folder, 'error.txt'))):
548
- mode = self.option_manager.get_arguments()['mode'].get()
549
-
550
- print("Mode: " + mode)
551
-
552
- if mode == "Optimization: MG-PSO":
554
+ # Parse data into interface
555
+ mode = self.option_manager.get_arguments()['mode'].get()
556
+ if mode == "Optimization: MG-PSO":
557
+ if (os.path.exists(os.path.join(folder, 'error.txt'))):
553
558
  data = hp.parse_pso_error(os.path.join(folder, 'error.txt'), len(self.option_manager.get_steps()))
559
+ self.progress_data = data["data"]
554
560
  self.footer_progress_bar.stop()
555
561
  self.footer_progress_bar.configure(mode="determinate")
556
562
  self.footer_progress_bar.set(data["percent"]/100)
557
563
  self.footer_progress_label.configure(text="Round: " + str(data["round"]) + " - Step: " + str(data["step"]))
558
- else:
564
+ else:
565
+ if (os.path.exists(os.path.join(folder, 'output.txt'))):
559
566
  data = hp.parse_sampling_output(os.path.join(folder, 'output.txt'))
560
- self.progress_data = data["data"]
561
567
  self.footer_progress_bar.stop()
562
568
  self.footer_progress_bar.configure(mode="determinate")
563
569
  self.footer_progress_bar.set(data["percent"]/100)
564
- #self.progress_message_left.configure(text="Percent Complete: " + str(round(data["percent"])) + "%")
565
- #self.progress_message_middle.configure(text=str(completed_rounds) + "/" + str(total_rounds))
566
- self.footer_progress_label.configure(text="Percent: " + str(data["percent"]))
567
- #self.progress_message_right.configure(text="Best Cost: " + str(best_cost))
568
-
569
- """with open(os.path.join(folder, 'error.txt'), 'r') as f:
570
- lines = f.readlines()
571
- lines_string = "".join(lines)
572
- self.data_cache = lines_string
573
-
574
- pattern = r'(\d+)%\|.*\|(\d+)/(\d+)(?:,\sbest_cost=(\d+\.\d+))?' # The magic of AI
575
- matches = re.findall(pattern, self.data_cache)
576
- filtered_matches = [match for match in matches if match[3] != '']
577
- matches = filtered_matches
578
-
579
- if len(matches) > 0:
580
- df = pd.DataFrame(matches, columns=['percent', 'completed_rounds', 'total_rounds', 'best_cost'], dtype=float)
581
- df = df[df['best_cost'] != '']
582
- df = df.dropna()
583
- df = df.drop_duplicates()
584
- df['round_step'] = (df['completed_rounds'].diff() < 0).cumsum()
585
- df = df.drop_duplicates(subset=['completed_rounds', 'round_step'])
586
- self.progress_data = df
587
-
588
- match = matches[-1]
589
- percent = int(match[0])
590
- completed_rounds = int(match[1])
591
- total_rounds = int(match[2])
592
- best_cost = float(match[3]) if match[3] else None
593
-
594
- if (percent > 0):
595
- #self.progress_bar.stop()
596
- self.footer_progress_bar.stop()
597
- #self.progress_bar.configure(mode="determinate")
598
- self.footer_progress_bar.configure(mode="determinate")
599
- #self.progress_bar.set(percent/100)
600
- self.footer_progress_bar.set(percent/100)
601
- self.progress_message_left.configure(text="Percent Complete: " + str(percent) + "%")
602
- self.progress_message_middle.configure(text=str(completed_rounds) + "/" + str(total_rounds))
603
- self.footer_progress_label.configure(text=str(completed_rounds) + "/" + str(total_rounds))
604
- self.progress_message_right.configure(text="Best Cost: " + str(best_cost))
605
- else:
606
- #self.progress_bar.configure(mode="indeterminate")
607
- self.footer_progress_bar.configure(mode="indeterminate")
608
- #self.progress_bar.start()
609
- self.footer_progress_bar.start()
610
- self.progress_message_left.configure(text="")
611
- self.progress_message_middle.configure(text="Starting new round...")
612
- self.footer_progress_label.configure(text="Next round...")
613
- self.progress_message_right.configure(text="")"""
570
+ self.footer_progress_label.configure(text=str(round(data["percent"])) + "%")
614
571
 
615
572
 
616
573
 
@@ -624,9 +581,9 @@ class App(customtkinter.CTk):
624
581
  #self.progress_bar.start()
625
582
  self.footer_progress_bar.start()
626
583
  self.progress_message_left.configure(text="")
627
- self.progress_message_middle.configure(text="Calibration finished!")
584
+ self.progress_message_middle.configure(text="Job finished!")
628
585
  self.progress_message_right.configure(text="")
629
- self.textbox.insert("0.0", "\nCalibration finished!\n")
586
+ self.textbox.insert("0.0", "\nJob finished!\n")
630
587
 
631
588
  # IF "./crash.txt" exists write it to the textbox
632
589
  if (os.path.exists(os.path.join(folder, 'crash.txt'))):
@@ -30,8 +30,6 @@ def parse_sampling_output(file_path):
30
30
  # Remove any lines that don't contain "% Done "
31
31
  lines = [line for line in lines if '% Done ' in line]
32
32
 
33
- print(lines)
34
-
35
33
  percents = []
36
34
  percent = 0
37
35
  for line in lines:
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
  import codecs
3
3
  import os
4
4
 
5
- VERSION = '0.1.143'
5
+ VERSION = '0.1.145'
6
6
  DESCRIPTION = 'GUI for MG-PSO'
7
7
  LONG_DESCRIPTION = open('../README.md').read()
8
8
 
File without changes