mg-pso-gui 0.1.107__py3-none-any.whl → 0.1.108__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.
- {mg_pso_gui-0.1.107.dist-info → mg_pso_gui-0.1.108.dist-info}/METADATA +1 -1
- {mg_pso_gui-0.1.107.dist-info → mg_pso_gui-0.1.108.dist-info}/RECORD +6 -6
- mgpsogui/util/PSORunner.py +66 -62
- {mg_pso_gui-0.1.107.dist-info → mg_pso_gui-0.1.108.dist-info}/WHEEL +0 -0
- {mg_pso_gui-0.1.107.dist-info → mg_pso_gui-0.1.108.dist-info}/entry_points.txt +0 -0
- {mg_pso_gui-0.1.107.dist-info → mg_pso_gui-0.1.108.dist-info}/top_level.txt +0 -0
|
@@ -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=HhUsFUFhCv3wTYV8CTqU0wo56Ph9c1DocPj25AVIAdI,15076
|
|
36
|
-
mgpsogui/util/PSORunner.py,sha256=
|
|
36
|
+
mgpsogui/util/PSORunner.py,sha256=Do3-OUH7iZGL6aoCcwsM-6lxof8ERwyKA-_g8rDr_DM,3942
|
|
37
37
|
mgpsogui/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
38
38
|
mgpsogui/util/debug.py,sha256=R-OBdE7XH5ejfDGoOHIgKr-TomzFy-jPvUhVzhSbzm0,5159
|
|
39
39
|
mgpsogui/util/CTkToolTip/__init__.py,sha256=G1jxV55hGtGgwyC1sR-uUUdasDdh0XZgcI-aILgGYA0,225
|
|
@@ -47,8 +47,8 @@ mgpsogui/util/recosu/utils/trace_writer.py,sha256=V9BJlOjCbNYGoXGEk3CF5wjifBxvar
|
|
|
47
47
|
mgpsogui/util/recosu/utils/utils.py,sha256=QB8vftq3142ekG0ORjz0ZBHU5YknXbR0oTsrxrPAsF0,3951
|
|
48
48
|
mgpsogui/util/recosu/utils/plot/__init__.py,sha256=h1KjM7_tNDv351pcwt8A6Ibb1jhwWyx5Gbu-zj-sI3Q,71
|
|
49
49
|
mgpsogui/util/recosu/utils/plot/cost_steps.py,sha256=1Ce11AJyweWkmvjXPxEygzS-h8yVLmQEDLS53yjPLqQ,3779
|
|
50
|
-
mg_pso_gui-0.1.
|
|
51
|
-
mg_pso_gui-0.1.
|
|
52
|
-
mg_pso_gui-0.1.
|
|
53
|
-
mg_pso_gui-0.1.
|
|
54
|
-
mg_pso_gui-0.1.
|
|
50
|
+
mg_pso_gui-0.1.108.dist-info/METADATA,sha256=VBb7hPzzkc0j8xwIyvavBKjoYwT5kFdfymm7zz1Do1Y,9459
|
|
51
|
+
mg_pso_gui-0.1.108.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
52
|
+
mg_pso_gui-0.1.108.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
|
|
53
|
+
mg_pso_gui-0.1.108.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
|
|
54
|
+
mg_pso_gui-0.1.108.dist-info/RECORD,,
|
mgpsogui/util/PSORunner.py
CHANGED
|
@@ -47,73 +47,77 @@ def run_process(stdout_queue, stderr_queue, results_queue, cosu_queue, data, fol
|
|
|
47
47
|
sys.stdout = os.fdopen(write_stdout, 'w')
|
|
48
48
|
sys.stderr = os.fdopen(write_stderr, 'w')
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
stdout_thread = threading.Thread(target=enqueue_output, args=(os.fdopen(read_stdout, 'r'), stdout_queue))
|
|
51
51
|
stderr_thread = threading.Thread(target=enqueue_output, args=(os.fdopen(read_stderr, 'r'), stderr_queue))
|
|
52
|
-
|
|
52
|
+
stdout_thread.daemon = True
|
|
53
53
|
stderr_thread.daemon = True
|
|
54
|
-
|
|
54
|
+
stdout_thread.start()
|
|
55
55
|
stderr_thread.start()
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
'service_timeout': int(calibration_map['service_timeout']),
|
|
68
|
-
'http_retry': int(calibration_map['http_retry']),
|
|
69
|
-
'http_allow_redirects': True if calibration_map['allow_redirects'] == "True" else False,
|
|
70
|
-
'async_call': True if calibration_map['async_call'] == "True" else False,
|
|
71
|
-
'http_conn_timeout': int(calibration_map['conn_timeout']),
|
|
72
|
-
'http_read_timeout': int(calibration_map['read_timeout']),
|
|
73
|
-
'particles_fail': int(calibration_map['particles_fail']),
|
|
74
|
-
'step_trace': os.path.join(folder, 'step_trace.json')
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
print("\n")
|
|
78
|
-
print(steps)
|
|
79
|
-
print("\n")
|
|
80
|
-
print(args)
|
|
81
|
-
print("\n")
|
|
82
|
-
print(calibration_map)
|
|
83
|
-
print("\n")
|
|
84
|
-
print(options)
|
|
85
|
-
print("\n")
|
|
86
|
-
print(oh_strategy)
|
|
87
|
-
print("\n")
|
|
88
|
-
print(config)
|
|
89
|
-
print("\n")
|
|
90
|
-
|
|
57
|
+
try:
|
|
58
|
+
|
|
59
|
+
options = {}
|
|
60
|
+
oh_strategy = {}
|
|
61
|
+
|
|
62
|
+
for key in calibration_map.keys():
|
|
63
|
+
if "options_" in key:
|
|
64
|
+
options[key.replace("options_", "")] = float(calibration_map[key])
|
|
65
|
+
if "strategy_" in key:
|
|
66
|
+
oh_strategy[key.replace("strategy_", "")] = calibration_map[key]
|
|
91
67
|
|
|
92
|
-
|
|
93
|
-
|
|
68
|
+
config = {
|
|
69
|
+
'service_timeout': int(calibration_map['service_timeout']),
|
|
70
|
+
'http_retry': int(calibration_map['http_retry']),
|
|
71
|
+
'http_allow_redirects': True if calibration_map['allow_redirects'] == "True" else False,
|
|
72
|
+
'async_call': True if calibration_map['async_call'] == "True" else False,
|
|
73
|
+
'http_conn_timeout': int(calibration_map['conn_timeout']),
|
|
74
|
+
'http_read_timeout': int(calibration_map['read_timeout']),
|
|
75
|
+
'particles_fail': int(calibration_map['particles_fail']),
|
|
76
|
+
'step_trace': os.path.join(folder, 'step_trace.json')
|
|
77
|
+
}
|
|
94
78
|
|
|
79
|
+
print("\n")
|
|
80
|
+
print(steps)
|
|
81
|
+
print("\n")
|
|
82
|
+
print(args)
|
|
83
|
+
print("\n")
|
|
84
|
+
print(calibration_map)
|
|
85
|
+
print("\n")
|
|
86
|
+
print(options)
|
|
87
|
+
print("\n")
|
|
88
|
+
print(oh_strategy)
|
|
89
|
+
print("\n")
|
|
90
|
+
print(config)
|
|
91
|
+
print("\n")
|
|
95
92
|
|
|
93
|
+
print("Running global_best...\n")
|
|
96
94
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
95
|
+
optimizer, trace = global_best(steps,
|
|
96
|
+
rounds=(int(calibration_map['min_rounds']), int(calibration_map['max_rounds'])),
|
|
97
|
+
args=args,
|
|
98
|
+
n_particles=int(calibration_map['n_particles']),
|
|
99
|
+
iters=int(calibration_map['iters']),
|
|
100
|
+
n_threads=int(calibration_map['n_threads']),
|
|
101
|
+
# ftol=0.00000001,
|
|
102
|
+
options=options,
|
|
103
|
+
oh_strategy=oh_strategy,
|
|
104
|
+
conf=config
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
results_queue.put(trace)
|
|
108
|
+
print(trace)
|
|
109
|
+
|
|
110
|
+
print("Finishing up...")
|
|
111
|
+
time.sleep(5)
|
|
112
|
+
except Exception as e:
|
|
113
|
+
print("An exception occurred: ")
|
|
114
|
+
print(str(e))
|
|
115
|
+
# Print stack trace
|
|
116
|
+
import traceback
|
|
117
|
+
traceback.print_exc()
|
|
118
|
+
finally:
|
|
119
|
+
stdout_thread.join()
|
|
120
|
+
stderr_thread.join()
|
|
121
|
+
|
|
122
|
+
sys.stdout = old_stdout
|
|
123
|
+
sys.stderr = old_stderr
|
|
File without changes
|
|
File without changes
|
|
File without changes
|