mg-pso-gui 0.1.96__py3-none-any.whl → 0.1.98__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.96
3
+ Version: 0.1.98
4
4
  Summary: GUI for MG-PSO
5
5
  Author: Robert Cordingly
6
6
  Author-email: <rcording@uw.ed>
@@ -33,21 +33,21 @@ 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=79GCLkyO2AG41uMGskRzA6PAOchDKUkDEheLi3tKDWk,3481
36
+ mgpsogui/util/PSORunner.py,sha256=zxLo_lQ9tGt7wKMxm0ungsj-fDo7kdxmj4CPfIA5jSA,3482
37
37
  mgpsogui/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
38
38
  mgpsogui/util/CTkToolTip/__init__.py,sha256=G1jxV55hGtGgwyC1sR-uUUdasDdh0XZgcI-aILgGYA0,225
39
39
  mgpsogui/util/CTkToolTip/ctk_tooltip.py,sha256=SZMovpQIGvdpDRbqCKl9SHs92DrFCO2MOYL2ifolvOE,6329
40
40
  mgpsogui/util/recosu/__init__.py,sha256=T7_iigIlowGbPOHLO3hwihjw2kbwIg6olOMhFhNiL38,236
41
41
  mgpsogui/util/recosu/pso/__init__.py,sha256=PQ548aEKVOk6MMzxxDg7yMO_1hHfoEoYLLkGLeij73Y,247
42
42
  mgpsogui/util/recosu/pso/csip_access.py,sha256=jBli1MSShUUwQCMKOUvMaGuNwBViCrjXJi_FmSEJsZA,2721
43
- mgpsogui/util/recosu/pso/pso.py,sha256=GCKecDTjtjD8tOg67swkf0lFfv84vGXWJ34E7Ask_1s,12827
43
+ mgpsogui/util/recosu/pso/pso.py,sha256=8tvrZIBNxvWv4AXgLYIYdGwvslFNr_fcQsg1Y3CSRjU,12821
44
44
  mgpsogui/util/recosu/utils/__init__.py,sha256=TXz_TpNif2GeGu22pzTnkUQvaP-PmLQ9Sz4BgMIS6ig,196
45
45
  mgpsogui/util/recosu/utils/trace_writer.py,sha256=V9BJlOjCbNYGoXGEk3CF5wjifBxvarrMRXJMbDBWqI8,3023
46
46
  mgpsogui/util/recosu/utils/utils.py,sha256=QB8vftq3142ekG0ORjz0ZBHU5YknXbR0oTsrxrPAsF0,3951
47
47
  mgpsogui/util/recosu/utils/plot/__init__.py,sha256=h1KjM7_tNDv351pcwt8A6Ibb1jhwWyx5Gbu-zj-sI3Q,71
48
48
  mgpsogui/util/recosu/utils/plot/cost_steps.py,sha256=1Ce11AJyweWkmvjXPxEygzS-h8yVLmQEDLS53yjPLqQ,3779
49
- mg_pso_gui-0.1.96.dist-info/METADATA,sha256=So-3i9StUZe-MohUQrRvRh6xef1z6qnGC3YF4N_-yPY,9458
50
- mg_pso_gui-0.1.96.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
51
- mg_pso_gui-0.1.96.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
52
- mg_pso_gui-0.1.96.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
53
- mg_pso_gui-0.1.96.dist-info/RECORD,,
49
+ mg_pso_gui-0.1.98.dist-info/METADATA,sha256=qt2URuZp-T7-OU3rLnl3XhnSFVdiCNC6wfE8_vYTxSs,9458
50
+ mg_pso_gui-0.1.98.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
51
+ mg_pso_gui-0.1.98.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
52
+ mg_pso_gui-0.1.98.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
53
+ mg_pso_gui-0.1.98.dist-info/RECORD,,
@@ -90,7 +90,7 @@ def run_process(stdout_queue, stderr_queue, results_queue, cosu_queue, data, fol
90
90
  'particles_fail': int(calibration_map['particles_fail']),
91
91
  'step_trace': os.path.join(folder, 'trace.json')
92
92
  },
93
- result_queue = cosu_queue
93
+ #result_queue = cosu_queue
94
94
  )
95
95
 
96
96
  results_queue.put(trace)
@@ -22,7 +22,7 @@ import datetime
22
22
  import queue
23
23
  import json
24
24
  import os
25
- from multiprocessing import Queue
25
+ from multiprocessing import Queue as MPQueue
26
26
 
27
27
 
28
28
  def eval_cost(x, iteration, step_param_names, step_objfunc, calib_params, req_queue, files, url, param, conf: Dict, rnd,
@@ -82,7 +82,7 @@ def eval_cost(x, iteration, step_param_names, step_objfunc, calib_params, req_qu
82
82
  def global_best(steps: Dict, rounds: Tuple, args: Dict, n_particles: int, iters: int, options: Dict,
83
83
  oh_strategy: Dict = None, n_threads: int = 4, rtol: float = 0.001, ftol: float = -np.inf,
84
84
  ftol_iter: int = 1, full_trace: List = None, rtol_iter: int = 1,
85
- conf: Dict = None, metainfo: Dict = None, cost_target: float = -np.inf, result_queue: Queue = None) -> Tuple:
85
+ conf: Dict = None, metainfo: Dict = None, cost_target: float = -np.inf, result_queue: MPQueue = None) -> Tuple:
86
86
  """Performs a stepwise particle swarm optimization PSO using a global best approach.
87
87
 
88
88
  Parameters
@@ -178,8 +178,6 @@ def global_best(steps: Dict, rounds: Tuple, args: Dict, n_particles: int, iters:
178
178
  step_trace['steps'] = copy.deepcopy(steps)
179
179
  #step_trace['args'] = args BUG MUST BE REMOVED
180
180
 
181
- print("Starting PSO with {} rounds, {} threads, {} particles, {} iterations, {} steps")
182
-
183
181
  if step_file is not None:
184
182
  with open(step_file, "w") as fo:
185
183
  json.dump(step_trace, fo)
@@ -242,21 +240,27 @@ def global_best(steps: Dict, rounds: Tuple, args: Dict, n_particles: int, iters:
242
240
  ftol=step.get('ftol', ftol),
243
241
  ftol_iter=step.get('ftol_iter', ftol_iter),
244
242
  cost_target=step.get('cost_target', cost_target))
245
- print('\n>>>>> R{}/S{} particle params: {} calibrated params: {}\n'.format(r + 1, s + 1, param_names,
246
- args['calib_params']))
243
+
244
+ print('\n>>>>> R{}/S{} particle params: {} calibrated params: {}\n'.format(r + 1, s + 1, param_names, args['calib_params']))
247
245
 
248
- if result_queue is not None:
249
- result_queue.put('\n>>>>> R{}/S{} particle params: {} calibrated params: {}\n'.format(r + 1, s + 1, param_names, args['calib_params']))
246
+ #if result_queue is not None:
247
+ # result_queue.put('\n>>>>> R{}/S{} particle params: {} calibrated params: {}\n'.format(r + 1, s + 1, param_names, args['calib_params']))
248
+
249
+ print("Filled request queue...")
250
250
 
251
251
  args['rnd'] = r + 1
252
252
  args['step'] = s + 1
253
253
 
254
+ print("Evaluating cost...")
255
+
254
256
  # perform optimization
255
257
  cost, pos = optimizer[s].optimize(eval_cost, iters=step.get('iters', iters), **args)
256
258
  if cost is None:
257
259
  early_exit = True
258
260
  break
259
261
 
262
+ print("Finished evaluation...")
263
+
260
264
  # capture the best cost
261
265
  # if cost < best_cost[s] and np.abs(cost - best_cost[s]) > rtol:
262
266
  if cost < best_cost[s]: