mg-pso-gui 0.1.134__py3-none-any.whl → 0.1.136__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mg-pso-gui
3
- Version: 0.1.134
3
+ Version: 0.1.136
4
4
  Summary: GUI for MG-PSO
5
5
  Author: Robert Cordingly
6
6
  Author-email: <rcording@uw.ed>
@@ -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=ZX-RfsT0TaklnRmfKnqdhuPsYM-QpVv6ZrtkJh47_zg,23352
4
+ mgpsogui/gui/HomePage.py,sha256=8kPCIOqWAmz1XtK2gk1Yi_StYxyjkS8GfQCVSdqvj0o,23686
5
5
  mgpsogui/gui/OptionManager.py,sha256=36_MlFd6nLt6xd6HHE2sHtL8oW7VBOZbCvJ8er-wWJ4,12544
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=KC-qVr4H17rmgfhxZs1P96EEhrBbFgV0vjoTkPvrS9M,15011
36
- mgpsogui/util/PSORunner.py,sha256=YmzsZbbTH8axrwJYq7ypCiOeMW4w4dnoLquv1mSGKSU,5729
36
+ mgpsogui/util/PSORunner.py,sha256=DoiBVmZ2Po_jGGGcsHNgd3fcv83KBy9ybFEQhZziVz8,6053
37
37
  mgpsogui/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
38
38
  mgpsogui/util/debug.py,sha256=Swzny9_1S-CCONWGssj9iDoSpbwu5Vr4f95g_9L8bec,19759
39
39
  mgpsogui/util/helpers.py,sha256=4Whv75Xe_5Qc5GBVfcglfOWsOTsvKmUTytgDcZzBG9s,2009
@@ -58,8 +58,8 @@ mgpsogui/util/recosu/utils/trace_writer.py,sha256=V9BJlOjCbNYGoXGEk3CF5wjifBxvar
58
58
  mgpsogui/util/recosu/utils/utils.py,sha256=QB8vftq3142ekG0ORjz0ZBHU5YknXbR0oTsrxrPAsF0,3951
59
59
  mgpsogui/util/recosu/utils/plot/__init__.py,sha256=h1KjM7_tNDv351pcwt8A6Ibb1jhwWyx5Gbu-zj-sI3Q,71
60
60
  mgpsogui/util/recosu/utils/plot/cost_steps.py,sha256=1Ce11AJyweWkmvjXPxEygzS-h8yVLmQEDLS53yjPLqQ,3779
61
- mg_pso_gui-0.1.134.dist-info/METADATA,sha256=oo5V-J0rYJ80RNsnESWgwDDOBhHGy16e-jyTWj-i7DA,9460
62
- mg_pso_gui-0.1.134.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
63
- mg_pso_gui-0.1.134.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
64
- mg_pso_gui-0.1.134.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
65
- mg_pso_gui-0.1.134.dist-info/RECORD,,
61
+ mg_pso_gui-0.1.136.dist-info/METADATA,sha256=T1syfxHvtJNvQQRqSKtQHmwETKJxL4kv0JTnUy9dZh8,9460
62
+ mg_pso_gui-0.1.136.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
63
+ mg_pso_gui-0.1.136.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
64
+ mg_pso_gui-0.1.136.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
65
+ mg_pso_gui-0.1.136.dist-info/RECORD,,
mgpsogui/gui/HomePage.py CHANGED
@@ -614,6 +614,14 @@ class App(customtkinter.CTk):
614
614
  self.progress_message_right.configure(text="")
615
615
  self.textbox.insert("0.0", "\nCalibration finished!\n")
616
616
 
617
+ # IF "./crash.txt" exists write it to the textbox
618
+ if (os.path.exists(os.path.join(folder, 'crash.txt'))):
619
+ with open(os.path.join(folder, 'crash.txt'), 'r') as f:
620
+ lines = f.readlines()
621
+ lines_string = "".join(lines)
622
+ self.textbox.insert('0.0', lines_string)
623
+ self.textbox.insert('0.0', "CRASH OCCURRED!\n")
624
+
617
625
  def start():
618
626
  app = App()
619
627
  app.mainloop()
@@ -68,16 +68,7 @@ def run_process(stdout_queue, stderr_queue, results_queue, data, folder):
68
68
  if "strategy_" in key:
69
69
  oh_strategy[key.replace("strategy_", "")] = calibration_map[key]
70
70
 
71
- config = {
72
- 'service_timeout': int(calibration_map['service_timeout']),
73
- 'http_retry': int(calibration_map['http_retry']),
74
- 'http_allow_redirects': True if calibration_map['allow_redirects'] == "True" else False,
75
- 'async_call': True if calibration_map['async_call'] == "True" else False,
76
- 'http_conn_timeout': int(calibration_map['conn_timeout']),
77
- 'http_read_timeout': int(calibration_map['read_timeout']),
78
- 'particles_fail': int(calibration_map['particles_fail']),
79
- 'step_trace': os.path.join(folder, 'pso_step_trace.json')
80
- }
71
+ config = {}
81
72
 
82
73
  if my_mode == "Sampling: Halton" or my_mode == "Sampling: Random":
83
74
  config = {
@@ -87,6 +78,16 @@ def run_process(stdout_queue, stderr_queue, results_queue, data, folder):
87
78
  'async_call': True if calibration_map['async_call'] == "True" else False,
88
79
  'conn_timeout': int(calibration_map['conn_timeout']),
89
80
  'read_timeout': int(calibration_map['read_timeout']),
81
+ 'step_trace': os.path.join(folder, 'pso_step_trace.json')
82
+ }
83
+ else:
84
+ config = {
85
+ 'service_timeout': int(calibration_map['service_timeout']),
86
+ 'http_retry': int(calibration_map['http_retry']),
87
+ 'http_allow_redirects': True if calibration_map['allow_redirects'] == "True" else False,
88
+ 'async_call': True if calibration_map['async_call'] == "True" else False,
89
+ 'http_conn_timeout': int(calibration_map['conn_timeout']),
90
+ 'http_read_timeout': int(calibration_map['read_timeout']),
90
91
  'particles_fail': int(calibration_map['particles_fail']),
91
92
  'step_trace': os.path.join(folder, 'pso_step_trace.json')
92
93
  }
@@ -105,9 +106,8 @@ def run_process(stdout_queue, stderr_queue, results_queue, data, folder):
105
106
  print(config)
106
107
  print("\n")
107
108
 
108
- print("Running global_best...\n")
109
-
110
109
  if my_mode == "Sampling: Halton":
110
+ print("Running Halton Sampling..\n")
111
111
  trace = run_sampler(steps,
112
112
  args,
113
113
  int(calibration_map['count']),
@@ -120,6 +120,7 @@ def run_process(stdout_queue, stderr_queue, results_queue, data, folder):
120
120
  print(trace)
121
121
 
122
122
  elif my_mode == "Sampling: Random":
123
+ print("Running Random Sampling...\n")
123
124
  trace = run_sampler(steps,
124
125
  args,
125
126
  int(calibration_map['count']),
@@ -130,7 +131,7 @@ def run_process(stdout_queue, stderr_queue, results_queue, data, folder):
130
131
  results_queue.put(trace)
131
132
  print(trace)
132
133
  else:
133
-
134
+ print("Running MG-PSO Optimization...\n")
134
135
  optimizer, trace = global_best(steps,
135
136
  rounds=(int(calibration_map['min_rounds']), int(calibration_map['max_rounds'])),
136
137
  args=args,
@@ -153,6 +154,12 @@ def run_process(stdout_queue, stderr_queue, results_queue, data, folder):
153
154
  # Print stack trace
154
155
  import traceback
155
156
  traceback.print_exc()
157
+
158
+ # Write all of this information to a crash file
159
+ with open(os.path.join(folder, 'crash.txt'), 'w') as f:
160
+ f.write(str(e))
161
+ f.write("\n")
162
+ traceback.print_exc(file=f)
156
163
  finally:
157
164
  stdout_thread.join()
158
165
  stderr_thread.join()