mg-pso-gui 0.1.133__py3-none-any.whl → 0.1.135__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.133
3
+ Version: 0.1.135
4
4
  Summary: GUI for MG-PSO
5
5
  Author: Robert Cordingly
6
6
  Author-email: <rcording@uw.ed>
@@ -32,11 +32,11 @@ mgpsogui/gui/images/stop.png,sha256=JPuxXQerCGpLikcp7cAj3iLCOjULMYYZ2sZe0lArh68,
32
32
  mgpsogui/gui/images/test.png,sha256=MUnVpRK-isxhEHzx4Q6Yh0M6FRZD1qvgCHH2XmiSBbk,3642
33
33
  mgpsogui/gui/images/trash.png,sha256=j8cf0kWbJd-4Jp20lUVV1o1NSeQ4v1Ej4gfcIA3DVRQ,2958
34
34
  mgpsogui/gui/images/up.png,sha256=AQvFWCUqSQNaQ1E6LKZ9zNfSvW6t4mgy8uswdg9T2Hg,2457
35
- mgpsogui/util/GraphGenerator.py,sha256=yaVb_oxo5vR-UhrydiHPkRFdiklVNcgtnndE1BJ54hw,14987
36
- mgpsogui/util/PSORunner.py,sha256=YmzsZbbTH8axrwJYq7ypCiOeMW4w4dnoLquv1mSGKSU,5729
35
+ mgpsogui/util/GraphGenerator.py,sha256=KC-qVr4H17rmgfhxZs1P96EEhrBbFgV0vjoTkPvrS9M,15011
36
+ mgpsogui/util/PSORunner.py,sha256=voiF0-Eo49yZGfnxFsZof6vizEheDcBUqASrqk9z4wE,5912
37
37
  mgpsogui/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
38
38
  mgpsogui/util/debug.py,sha256=Swzny9_1S-CCONWGssj9iDoSpbwu5Vr4f95g_9L8bec,19759
39
- mgpsogui/util/helpers.py,sha256=rG89dG8v2W0U8kuawGWFhxQiJkRzl6A7l7UAM_jHWAk,1995
39
+ mgpsogui/util/helpers.py,sha256=4Whv75Xe_5Qc5GBVfcglfOWsOTsvKmUTytgDcZzBG9s,2009
40
40
  mgpsogui/util/sampler_test_driver.py,sha256=1iJTLVFZ_VCsuIdl3mXQBA1GNAH5jJO3z5h4E_bd5U8,3703
41
41
  mgpsogui/util/CTkToolTip/__init__.py,sha256=G1jxV55hGtGgwyC1sR-uUUdasDdh0XZgcI-aILgGYA0,225
42
42
  mgpsogui/util/CTkToolTip/ctk_tooltip.py,sha256=SZMovpQIGvdpDRbqCKl9SHs92DrFCO2MOYL2ifolvOE,6329
@@ -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.133.dist-info/METADATA,sha256=xt7m13uQiOZu9o5KFV_iWdAjE0JhgVWTY3ny9ZfcwTM,9460
62
- mg_pso_gui-0.1.133.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
63
- mg_pso_gui-0.1.133.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
64
- mg_pso_gui-0.1.133.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
65
- mg_pso_gui-0.1.133.dist-info/RECORD,,
61
+ mg_pso_gui-0.1.135.dist-info/METADATA,sha256=ws7fB3VzT9Hv_za_65A05MtIBVc0zOxQeY-cWTQeLqA,9460
62
+ mg_pso_gui-0.1.135.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
63
+ mg_pso_gui-0.1.135.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
64
+ mg_pso_gui-0.1.135.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
65
+ mg_pso_gui-0.1.135.dist-info/RECORD,,
@@ -159,7 +159,7 @@ def best_cost_by_round(config, data, option_manager):
159
159
  #step_index = ((iteration) % total_steps)
160
160
  #round_index = ((iteration) // total_steps)
161
161
 
162
- fig.add_trace(go.Scatter(x=np.array(data['percent']) + (100 * round_index), y=data['best_cost'], name=round_step))
162
+ fig.add_trace(go.Scatter(x=np.array(data[round_step]['percent']) + (100 * round_index), y=data[round_step]['best_cost'], name=round_step))
163
163
 
164
164
  #fig.add_trace(go.Scatter(x=df['completed_rounds'] + (df['total_rounds'] * round_index), y=df['best_cost'], name='Group ' + str(step_index + 1)))
165
165
 
@@ -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 = {
@@ -90,6 +81,17 @@ def run_process(stdout_queue, stderr_queue, results_queue, data, folder):
90
81
  'particles_fail': int(calibration_map['particles_fail']),
91
82
  'step_trace': os.path.join(folder, 'pso_step_trace.json')
92
83
  }
84
+ else:
85
+ config = {
86
+ 'service_timeout': int(calibration_map['service_timeout']),
87
+ 'http_retry': int(calibration_map['http_retry']),
88
+ 'http_allow_redirects': True if calibration_map['allow_redirects'] == "True" else False,
89
+ 'async_call': True if calibration_map['async_call'] == "True" else False,
90
+ 'http_conn_timeout': int(calibration_map['conn_timeout']),
91
+ 'http_read_timeout': int(calibration_map['read_timeout']),
92
+ 'particles_fail': int(calibration_map['particles_fail']),
93
+ 'step_trace': os.path.join(folder, 'pso_step_trace.json')
94
+ }
93
95
 
94
96
  print("\n")
95
97
  print(steps)
@@ -105,9 +107,8 @@ def run_process(stdout_queue, stderr_queue, results_queue, data, folder):
105
107
  print(config)
106
108
  print("\n")
107
109
 
108
- print("Running global_best...\n")
109
-
110
110
  if my_mode == "Sampling: Halton":
111
+ print("Running Halton Sampling..\n")
111
112
  trace = run_sampler(steps,
112
113
  args,
113
114
  int(calibration_map['count']),
@@ -120,6 +121,7 @@ def run_process(stdout_queue, stderr_queue, results_queue, data, folder):
120
121
  print(trace)
121
122
 
122
123
  elif my_mode == "Sampling: Random":
124
+ print("Running Random Sampling...\n")
123
125
  trace = run_sampler(steps,
124
126
  args,
125
127
  int(calibration_map['count']),
@@ -130,7 +132,7 @@ def run_process(stdout_queue, stderr_queue, results_queue, data, folder):
130
132
  results_queue.put(trace)
131
133
  print(trace)
132
134
  else:
133
-
135
+ print("Running MG-PSO Optimization...\n")
134
136
  optimizer, trace = global_best(steps,
135
137
  rounds=(int(calibration_map['min_rounds']), int(calibration_map['max_rounds'])),
136
138
  args=args,
mgpsogui/util/helpers.py CHANGED
@@ -50,8 +50,8 @@ def parse_pso_error(file_path, num_steps):
50
50
  in100s = True
51
51
 
52
52
  round_steps[f"Round: {round} - Step: {step}"] = {
53
- "best_cost": best_costs,
54
- "percent": percents
53
+ "best_cost": best_costs.copy(),
54
+ "percent": percents.copy()
55
55
  }
56
56
 
57
57
  best_costs = []