mg-pso-gui 0.1.153__py3-none-any.whl → 0.1.154__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.153
3
+ Version: 0.1.154
4
4
  Summary: GUI for MG-PSO
5
5
  Author: Robert Cordingly
6
6
  Author-email: <rcording@uw.ed>
@@ -36,7 +36,7 @@ mgpsogui/util/GraphGenerator.py,sha256=KC-qVr4H17rmgfhxZs1P96EEhrBbFgV0vjoTkPvrS
36
36
  mgpsogui/util/PSORunner.py,sha256=Bk6IXsBKSB33uccTJX7xagYwXHLgUbvpcM5qoi1MXHo,6170
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=nnRgQ9hCGp5RhyesfT_ZI01CthyuK-VX62yx7ukyTdY,2441
39
+ mgpsogui/util/helpers.py,sha256=Fumv1xIenv75PErV2qPertqpqkseFA4xxUh1Q7xU0Ts,2485
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.153.dist-info/METADATA,sha256=YOeOOwRM-YW1ctzp5nkZx_ZHFG3ro0tSLhYd1NHvJgA,9460
62
- mg_pso_gui-0.1.153.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
63
- mg_pso_gui-0.1.153.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
64
- mg_pso_gui-0.1.153.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
65
- mg_pso_gui-0.1.153.dist-info/RECORD,,
61
+ mg_pso_gui-0.1.154.dist-info/METADATA,sha256=1TiA9RptZ9a9Y2ZQEDojIXcmXUIBPbAqF311oejRcFk,9460
62
+ mg_pso_gui-0.1.154.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
63
+ mg_pso_gui-0.1.154.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
64
+ mg_pso_gui-0.1.154.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
65
+ mg_pso_gui-0.1.154.dist-info/RECORD,,
mgpsogui/util/helpers.py CHANGED
@@ -47,24 +47,23 @@ def parse_pso_error(file_path, num_steps):
47
47
  lines = [line for line in lines if 'best_cost' in line]
48
48
  lines = [line.replace("pyswarms.single.global_best: ", "") for line in lines]
49
49
 
50
+ # Add a fake line to make sure the last round is added
51
+ lines.append(" 0% /best_cost=0")
52
+
50
53
  round = 1
51
54
  step = 1
52
55
 
53
56
  round_steps = {}
54
57
  percents = []
55
58
  best_costs = []
56
- in100s = False
57
59
  percent = 0
60
+ last_percent = 0
58
61
  for line in lines:
59
62
  best_cost = float(line.split('best_cost=')[1].strip())
60
63
  percent = float(line.split('%')[0].strip())
61
64
 
62
- best_costs.append(best_cost)
63
- percents.append(percent)
64
-
65
65
  # Percent is less than last percent or we are at the end of the file
66
- if (percent == 100 and not in100s):
67
- in100s = True
66
+ if (percent < last_percent):
68
67
 
69
68
  round_steps[f"Round: {round} - Step: {step}"] = {
70
69
  "best_cost": best_costs.copy(),
@@ -79,7 +78,9 @@ def parse_pso_error(file_path, num_steps):
79
78
  step = 1
80
79
  round += 1
81
80
 
82
- if percent != 100:
83
- in100s = False
81
+ best_costs.append(best_cost)
82
+ percents.append(percent)
83
+
84
+ last_percent = percent
84
85
 
85
86
  return {"round": round, "step": step, "percent": percent, "data": round_steps}