mg-pso-gui 0.2.34__py3-none-any.whl → 0.2.36__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.2.34.dist-info → mg_pso_gui-0.2.36.dist-info}/METADATA +1 -1
- {mg_pso_gui-0.2.34.dist-info → mg_pso_gui-0.2.36.dist-info}/RECORD +7 -7
- mgpsogui/gui/HomePage.py +1 -0
- mgpsogui/util/PSORunner.py +60 -41
- {mg_pso_gui-0.2.34.dist-info → mg_pso_gui-0.2.36.dist-info}/WHEEL +0 -0
- {mg_pso_gui-0.2.34.dist-info → mg_pso_gui-0.2.36.dist-info}/entry_points.txt +0 -0
- {mg_pso_gui-0.2.34.dist-info → mg_pso_gui-0.2.36.dist-info}/top_level.txt +0 -0
@@ -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=
|
4
|
+
mgpsogui/gui/HomePage.py,sha256=HMWxGBuhrSrMqxgM8fupInSHm0Uk2ZvKQ4l9ofVsNN4,21571
|
5
5
|
mgpsogui/gui/OptionManager.py,sha256=HLVib_lHdMijykF78bJ9_PEl-oROuC8lxd1oBS7524U,21898
|
6
6
|
mgpsogui/gui/OptionManager_backup.py,sha256=TCWfPnHL2foN5id47jsi267lamRG6yGU6y_M29eOOJk,18530
|
7
7
|
mgpsogui/gui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -44,7 +44,7 @@ mgpsogui/gui/images/test.png,sha256=MUnVpRK-isxhEHzx4Q6Yh0M6FRZD1qvgCHH2XmiSBbk,
|
|
44
44
|
mgpsogui/gui/images/trash.png,sha256=j8cf0kWbJd-4Jp20lUVV1o1NSeQ4v1Ej4gfcIA3DVRQ,2958
|
45
45
|
mgpsogui/gui/images/up.png,sha256=AQvFWCUqSQNaQ1E6LKZ9zNfSvW6t4mgy8uswdg9T2Hg,2457
|
46
46
|
mgpsogui/util/GraphGenerator.py,sha256=dKzDPMK-0S6j1yIp5xoQIgN9GTKMhGpboAXjofCpmIk,31973
|
47
|
-
mgpsogui/util/PSORunner.py,sha256=
|
47
|
+
mgpsogui/util/PSORunner.py,sha256=anp0ioxAz6uv8OFGtRhVHFrOsq3CRHN2x02ekMaKfn4,20830
|
48
48
|
mgpsogui/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
49
49
|
mgpsogui/util/debug.py,sha256=Swzny9_1S-CCONWGssj9iDoSpbwu5Vr4f95g_9L8bec,19759
|
50
50
|
mgpsogui/util/helpers.py,sha256=Ht2rge_4pGO7halz6KoLsL2eukB0k2tlkx68lBBmBA8,2669
|
@@ -69,8 +69,8 @@ mgpsogui/util/recosu/utils/trace_writer.py,sha256=V9BJlOjCbNYGoXGEk3CF5wjifBxvar
|
|
69
69
|
mgpsogui/util/recosu/utils/utils.py,sha256=QB8vftq3142ekG0ORjz0ZBHU5YknXbR0oTsrxrPAsF0,3951
|
70
70
|
mgpsogui/util/recosu/utils/plot/__init__.py,sha256=h1KjM7_tNDv351pcwt8A6Ibb1jhwWyx5Gbu-zj-sI3Q,71
|
71
71
|
mgpsogui/util/recosu/utils/plot/cost_steps.py,sha256=1Ce11AJyweWkmvjXPxEygzS-h8yVLmQEDLS53yjPLqQ,3779
|
72
|
-
mg_pso_gui-0.2.
|
73
|
-
mg_pso_gui-0.2.
|
74
|
-
mg_pso_gui-0.2.
|
75
|
-
mg_pso_gui-0.2.
|
76
|
-
mg_pso_gui-0.2.
|
72
|
+
mg_pso_gui-0.2.36.dist-info/METADATA,sha256=tYHCIkURKewDkHp2J3FVk9G_44-uMLleQakUU-nO9gM,9455
|
73
|
+
mg_pso_gui-0.2.36.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
|
74
|
+
mg_pso_gui-0.2.36.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
|
75
|
+
mg_pso_gui-0.2.36.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
|
76
|
+
mg_pso_gui-0.2.36.dist-info/RECORD,,
|
mgpsogui/gui/HomePage.py
CHANGED
mgpsogui/util/PSORunner.py
CHANGED
@@ -30,53 +30,72 @@ def run_process(stdout_queue, stderr_queue, results_queue, data, folder, mode):
|
|
30
30
|
folder (_type_): _description_
|
31
31
|
mode (_type_): _description_
|
32
32
|
"""
|
33
|
+
try:
|
34
|
+
# Setup folders
|
35
|
+
if not os.path.exists(folder):
|
36
|
+
os.makedirs(folder)
|
33
37
|
|
34
|
-
|
35
|
-
|
36
|
-
os.makedirs(folder)
|
38
|
+
if not os.path.exists(os.path.join(folder, "results")):
|
39
|
+
os.makedirs(os.path.join(folder, "results"))
|
37
40
|
|
38
|
-
|
39
|
-
|
41
|
+
if (os.path.exists(os.path.join(folder, 'output.txt'))):
|
42
|
+
os.remove(os.path.join(folder, 'output.txt'))
|
43
|
+
|
44
|
+
if (os.path.exists(os.path.join(folder, 'error.txt'))):
|
45
|
+
os.remove(os.path.join(folder, 'error.txt'))
|
40
46
|
|
41
|
-
|
42
|
-
|
47
|
+
# Redirect stdout and stderr to files
|
48
|
+
old_stdout = sys.stdout
|
49
|
+
old_stderr = sys.stderr
|
43
50
|
|
44
|
-
|
45
|
-
os.
|
51
|
+
read_stdout, write_stdout = os.pipe()
|
52
|
+
read_stderr, write_stderr = os.pipe()
|
53
|
+
|
54
|
+
sys.stdout = os.fdopen(write_stdout, 'w')
|
55
|
+
sys.stderr = os.fdopen(write_stderr, 'w')
|
56
|
+
|
57
|
+
stdout_thread = threading.Thread(target=enqueue_output, args=(os.fdopen(read_stdout, 'r'), stdout_queue))
|
58
|
+
stderr_thread = threading.Thread(target=enqueue_output, args=(os.fdopen(read_stderr, 'r'), stderr_queue))
|
59
|
+
stdout_thread.daemon = True
|
60
|
+
stderr_thread.daemon = True
|
61
|
+
stdout_thread.start()
|
62
|
+
stderr_thread.start()
|
63
|
+
|
64
|
+
if mode == "Sampling: Halton":
|
65
|
+
run_sampling(data, "halton", folder, results_queue)
|
66
|
+
elif mode == "Sampling: Random":
|
67
|
+
run_sampling(data, "random", folder, results_queue)
|
68
|
+
elif mode == "Sensitivity Analysis":
|
69
|
+
run_sensitivity_analysis(data, folder, results_queue)
|
70
|
+
elif mode == "Optimization":
|
71
|
+
run_optimization(data, folder, results_queue)
|
72
|
+
else:
|
73
|
+
print("Invalid mode")
|
46
74
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
stdout_thread.daemon = True
|
60
|
-
stderr_thread.daemon = True
|
61
|
-
stdout_thread.start()
|
62
|
-
stderr_thread.start()
|
75
|
+
stdout_thread.join()
|
76
|
+
stderr_thread.join()
|
77
|
+
|
78
|
+
sys.stdout = old_stdout
|
79
|
+
sys.stderr = old_stderr
|
80
|
+
|
81
|
+
except Exception as e:
|
82
|
+
print("An exception occurred: ", flush=True)
|
83
|
+
print(str(e))
|
84
|
+
# Print stack trace
|
85
|
+
import traceback
|
86
|
+
traceback.print_exc()
|
63
87
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
stdout_thread.join()
|
76
|
-
stderr_thread.join()
|
77
|
-
|
78
|
-
sys.stdout = old_stdout
|
79
|
-
sys.stderr = old_stderr
|
88
|
+
# Write all of this information to a crash file
|
89
|
+
with open(os.path.join(folder, 'crash.txt'), 'w') as f:
|
90
|
+
f.write(str(e))
|
91
|
+
f.write("\n")
|
92
|
+
traceback.print_exc(file=f)
|
93
|
+
finally:
|
94
|
+
stdout_thread.join()
|
95
|
+
stderr_thread.join()
|
96
|
+
|
97
|
+
sys.stdout = old_stdout
|
98
|
+
sys.stderr = old_stderr
|
80
99
|
|
81
100
|
def process_list(data, parameter_map, args, options, oh_strategy, config, metainfo, list_name):
|
82
101
|
"""_summary_
|
File without changes
|
File without changes
|
File without changes
|