mg-pso-gui 0.0.207__py3-none-any.whl → 0.0.209__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.0.207
3
+ Version: 0.0.209
4
4
  Summary: GUI for MG-PSO
5
5
  Author: Robert Cordingly
6
6
  Author-email: <rcording@uw.ed>
@@ -30,12 +30,12 @@ mgpsogui/gui/images/stop.png,sha256=JPuxXQerCGpLikcp7cAj3iLCOjULMYYZ2sZe0lArh68,
30
30
  mgpsogui/gui/images/trash.png,sha256=j8cf0kWbJd-4Jp20lUVV1o1NSeQ4v1Ej4gfcIA3DVRQ,2958
31
31
  mgpsogui/gui/images/up.png,sha256=AQvFWCUqSQNaQ1E6LKZ9zNfSvW6t4mgy8uswdg9T2Hg,2457
32
32
  mgpsogui/util/GraphGenerator.py,sha256=hEPhka0ZKQJ9DSSywDfwoXFQMsk3RHyG8QyTLOQnN4M,7851
33
- mgpsogui/util/PSORunner.py,sha256=--Cx3si3lKbgFW63724dPVa75CPkv-izEpwnNmGdMQU,6936
33
+ mgpsogui/util/PSORunner.py,sha256=vT1LC6MlzQasgYDmmFRbPaRBhi3aUSqbcfqhHbpcR04,7447
34
34
  mgpsogui/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
35
  mgpsogui/util/CTkToolTip/__init__.py,sha256=G1jxV55hGtGgwyC1sR-uUUdasDdh0XZgcI-aILgGYA0,225
36
36
  mgpsogui/util/CTkToolTip/ctk_tooltip.py,sha256=SZMovpQIGvdpDRbqCKl9SHs92DrFCO2MOYL2ifolvOE,6329
37
- mg_pso_gui-0.0.207.dist-info/METADATA,sha256=U1Fzz6hhAjI0iCtqzUgNJyO0zyNYT-nqpWaQD21jePc,9459
38
- mg_pso_gui-0.0.207.dist-info/WHEEL,sha256=Xo9-1PvkuimrydujYJAjF7pCkriuXBpUPEjma1nZyJ0,92
39
- mg_pso_gui-0.0.207.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
40
- mg_pso_gui-0.0.207.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
41
- mg_pso_gui-0.0.207.dist-info/RECORD,,
37
+ mg_pso_gui-0.0.209.dist-info/METADATA,sha256=aT7ZkYLH8fr8sEuLLpQWcv33C-eoMU-G2YtfMrDx5Lk,9459
38
+ mg_pso_gui-0.0.209.dist-info/WHEEL,sha256=Xo9-1PvkuimrydujYJAjF7pCkriuXBpUPEjma1nZyJ0,92
39
+ mg_pso_gui-0.0.209.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
40
+ mg_pso_gui-0.0.209.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
41
+ mg_pso_gui-0.0.209.dist-info/RECORD,,
@@ -78,25 +78,35 @@ def run_process(stdout_queue, stderr_queue, results_queue, data, folder):
78
78
 
79
79
  print("Running global_best...\n")
80
80
 
81
- optimizer, trace = global_best(steps, # step definition
82
- rounds=(int(calibration_map['min_rounds']), int(calibration_map['max_rounds'])), # min/max number of rounds
83
- args=args, # static arguments
84
- n_particles=int(calibration_map['n_particles']), # number of particle candidates for each param
85
- iters=int(calibration_map['iters']), # max # of iterations
86
- n_threads=int(calibration_map['n_threads']), # number of threads to use
87
- # ftol=0.00000001, # min cost function delta for convergence
88
- options=options, # hyperparameter
89
- oh_strategy=oh_strategy, # adaptive hyperparameter adjustments based on current and max # of iterations
90
- conf={
91
- 'service_timeout': int(calibration_map['service_timeout']),
92
- 'http_retry': int(calibration_map['http_retry']),
93
- 'http_allow_redirects': True if calibration_map['allow_redirects'] == "True" else False,
94
- 'async_call': True if calibration_map['async_call'] == "True" else False,
95
- 'http_conn_timeout': int(calibration_map['conn_timeout']),
96
- 'http_read_timeout': int(calibration_map['read_timeout']),
97
- 'particles_fail': int(calibration_map['particles_fail'])
98
- },
99
- )
81
+ import threading
82
+
83
+ def run_optimizer_thread(steps, calibration_map, args, options, oh_strategy, results_queue):
84
+ optimizer, trace = global_best(steps, # step definition
85
+ rounds=(int(calibration_map['min_rounds']), int(calibration_map['max_rounds'])), # min/max number of rounds
86
+ args=args, # static arguments
87
+ n_particles=int(calibration_map['n_particles']), # number of particle candidates for each param
88
+ iters=int(calibration_map['iters']), # max # of iterations
89
+ n_threads=int(calibration_map['n_threads']), # number of threads to use
90
+ # ftol=0.00000001, # min cost function delta for convergence
91
+ options=options, # hyperparameter
92
+ oh_strategy=oh_strategy, # adaptive hyperparameter adjustments based on current and max # of iterations
93
+ conf={
94
+ 'service_timeout': int(calibration_map['service_timeout']),
95
+ 'http_retry': int(calibration_map['http_retry']),
96
+ 'http_allow_redirects': True if calibration_map['allow_redirects'] == "True" else False,
97
+ 'async_call': True if calibration_map['async_call'] == "True" else False,
98
+ 'http_conn_timeout': int(calibration_map['conn_timeout']),
99
+ 'http_read_timeout': int(calibration_map['read_timeout']),
100
+ 'particles_fail': int(calibration_map['particles_fail'])
101
+ },
102
+ )
103
+ results_queue.put((optimizer, trace))
104
+
105
+ results_queue = Queue()
106
+ optimizer_thread = threading.Thread(target=run_optimizer_thread, args=(steps, calibration_map, args, options, oh_strategy, results_queue))
107
+ optimizer_thread.start()
108
+ optimizer_thread.join()
109
+ optimizer, trace = results_queue.get()
100
110
 
101
111
  stdour_thread.join()
102
112
  stderr_thread.join()