mg-pso-gui 0.1.98__tar.gz → 0.1.101__tar.gz

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.
Files changed (58) hide show
  1. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/PKG-INFO +1 -1
  2. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mg_pso_gui.egg-info/PKG-INFO +1 -1
  3. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mg_pso_gui.egg-info/SOURCES.txt +1 -0
  4. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/util/PSORunner.py +18 -14
  5. mg-pso-gui-0.1.101/mgpsogui/util/debug.py +118 -0
  6. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/setup.py +1 -1
  7. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mg_pso_gui.egg-info/dependency_links.txt +0 -0
  8. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mg_pso_gui.egg-info/entry_points.txt +0 -0
  9. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mg_pso_gui.egg-info/requires.txt +0 -0
  10. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mg_pso_gui.egg-info/top_level.txt +0 -0
  11. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/__init__.py +0 -0
  12. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/gui/HomePage.py +0 -0
  13. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/gui/OptionManager.py +0 -0
  14. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/gui/PlatformTab/PlatformTab.py +0 -0
  15. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/gui/PlatformTab/__init__.py +0 -0
  16. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/gui/RunTab/RunTab.py +0 -0
  17. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/gui/RunTab/__init__.py +0 -0
  18. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/gui/SetupTab/BoundsEditorWindow.py +0 -0
  19. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/gui/SetupTab/BoundsList.py +0 -0
  20. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/gui/SetupTab/CalibrationParametersView.py +0 -0
  21. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/gui/SetupTab/FunctionsList.py +0 -0
  22. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/gui/SetupTab/ListParametersView.py +0 -0
  23. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/gui/SetupTab/OptimalParameterView.py +0 -0
  24. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/gui/SetupTab/SetupTab.py +0 -0
  25. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/gui/SetupTab/StaticParameterView.py +0 -0
  26. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/gui/SetupTab/StepView.py +0 -0
  27. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/gui/SetupTab/__init__.py +0 -0
  28. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/gui/VisualizeTab/SideBar.py +0 -0
  29. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/gui/VisualizeTab/VisualizeTab.py +0 -0
  30. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/gui/VisualizeTab/__init__.py +0 -0
  31. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/gui/__init__.py +0 -0
  32. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/gui/images/IGOW 4 Logo.png +0 -0
  33. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/gui/images/collapse.png +0 -0
  34. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/gui/images/down.png +0 -0
  35. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/gui/images/expand.png +0 -0
  36. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/gui/images/play.png +0 -0
  37. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/gui/images/refresh.png +0 -0
  38. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/gui/images/refresh_hd.png +0 -0
  39. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/gui/images/stop.png +0 -0
  40. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/gui/images/test.png +0 -0
  41. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/gui/images/trash.png +0 -0
  42. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/gui/images/up.png +0 -0
  43. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/mgpsogui.py +0 -0
  44. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/start.yaml +0 -0
  45. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/util/CTkToolTip/__init__.py +0 -0
  46. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/util/CTkToolTip/ctk_tooltip.py +0 -0
  47. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/util/GraphGenerator.py +0 -0
  48. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/util/__init__.py +0 -0
  49. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/util/recosu/__init__.py +0 -0
  50. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/util/recosu/pso/__init__.py +0 -0
  51. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/util/recosu/pso/csip_access.py +0 -0
  52. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/util/recosu/pso/pso.py +0 -0
  53. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/util/recosu/utils/__init__.py +0 -0
  54. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/util/recosu/utils/plot/__init__.py +0 -0
  55. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/util/recosu/utils/plot/cost_steps.py +0 -0
  56. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/util/recosu/utils/trace_writer.py +0 -0
  57. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/mgpsogui/util/recosu/utils/utils.py +0 -0
  58. {mg-pso-gui-0.1.98 → mg-pso-gui-0.1.101}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mg-pso-gui
3
- Version: 0.1.98
3
+ Version: 0.1.101
4
4
  Summary: GUI for MG-PSO
5
5
  Author: Robert Cordingly
6
6
  Author-email: <rcording@uw.ed>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mg-pso-gui
3
- Version: 0.1.98
3
+ Version: 0.1.101
4
4
  Summary: GUI for MG-PSO
5
5
  Author: Robert Cordingly
6
6
  Author-email: <rcording@uw.ed>
@@ -42,6 +42,7 @@ mgpsogui/gui/images/up.png
42
42
  mgpsogui/util/GraphGenerator.py
43
43
  mgpsogui/util/PSORunner.py
44
44
  mgpsogui/util/__init__.py
45
+ mgpsogui/util/debug.py
45
46
  mgpsogui/util/CTkToolTip/__init__.py
46
47
  mgpsogui/util/CTkToolTip/ctk_tooltip.py
47
48
  mgpsogui/util/recosu/__init__.py
@@ -1,6 +1,4 @@
1
- import csip
2
- from csip import Client
3
- import cosu
1
+
4
2
  import sys
5
3
  from multiprocessing import Process, Queue
6
4
  from queue import Empty
@@ -61,6 +59,16 @@ def run_process(stdout_queue, stderr_queue, results_queue, cosu_queue, data, fol
61
59
  if "strategy_" in key:
62
60
  oh_strategy[key.replace("strategy_", "")] = calibration_map[key]
63
61
 
62
+ config = {
63
+ 'service_timeout': int(calibration_map['service_timeout']),
64
+ 'http_retry': int(calibration_map['http_retry']),
65
+ 'http_allow_redirects': True if calibration_map['allow_redirects'] == "True" else False,
66
+ 'async_call': True if calibration_map['async_call'] == "True" else False,
67
+ 'http_conn_timeout': int(calibration_map['conn_timeout']),
68
+ 'http_read_timeout': int(calibration_map['read_timeout']),
69
+ 'particles_fail': int(calibration_map['particles_fail'])
70
+ }
71
+
64
72
  print("\n")
65
73
  print(calibration_map)
66
74
  print("\n")
@@ -68,9 +76,15 @@ def run_process(stdout_queue, stderr_queue, results_queue, cosu_queue, data, fol
68
76
  print("\n")
69
77
  print(oh_strategy)
70
78
  print("\n")
79
+ print(config)
80
+ print("\n")
81
+
82
+
71
83
 
72
84
  print("Running global_best...\n")
73
85
 
86
+
87
+
74
88
  optimizer, trace = global_best(steps,
75
89
  rounds=(int(calibration_map['min_rounds']), int(calibration_map['max_rounds'])),
76
90
  args=args,
@@ -80,17 +94,7 @@ def run_process(stdout_queue, stderr_queue, results_queue, cosu_queue, data, fol
80
94
  # ftol=0.00000001,
81
95
  options=options,
82
96
  oh_strategy=oh_strategy,
83
- conf={
84
- 'service_timeout': int(calibration_map['service_timeout']),
85
- 'http_retry': int(calibration_map['http_retry']),
86
- 'http_allow_redirects': True if calibration_map['allow_redirects'] == "True" else False,
87
- 'async_call': True if calibration_map['async_call'] == "True" else False,
88
- 'http_conn_timeout': int(calibration_map['conn_timeout']),
89
- 'http_read_timeout': int(calibration_map['read_timeout']),
90
- 'particles_fail': int(calibration_map['particles_fail']),
91
- 'step_trace': os.path.join(folder, 'trace.json')
92
- },
93
- #result_queue = cosu_queue
97
+ conf=config
94
98
  )
95
99
 
96
100
  results_queue.put(trace)
@@ -0,0 +1,118 @@
1
+ from recosu.pso import global_best
2
+
3
+ # 1) COSU steps, definition of parameters to calibrate
4
+ steps = [
5
+ { # step 1
6
+ 'param': [
7
+ {
8
+ 'name': 'soilOutLPS',
9
+ 'bounds': (0.0, 2.0)
10
+ },
11
+ {
12
+ 'name': 'lagInterflow',
13
+ 'bounds': (10.0, 80.0)
14
+ }
15
+ ],
16
+ 'objfunc': [
17
+ {
18
+ 'name': 'ns', # Name (Must be unique)
19
+ 'of':'ns', # Objective Function
20
+ 'data': ('obs_data02_14.csv/obs/orun[1]',
21
+ 'output/csip_run/out/Outlet.csv/output/catchmentSimRunoff')
22
+ # Optional Weight parameter. If not specified it is 1 or evenly distributed between all objective functions
23
+ }
24
+ ]
25
+ },
26
+ { # step 2
27
+ 'param': [
28
+ {
29
+ 'name': 'flowRouteTA',
30
+ 'bounds': (0.4, 5.0)
31
+ },
32
+ {
33
+ 'name': 'soilMaxDPS',
34
+ 'bounds': (0.0, 5.0)
35
+ }
36
+ ],
37
+ 'objfunc': [
38
+ {
39
+ 'name': 'ns',
40
+ 'of':'ns',
41
+ 'data': ('obs_data02_14.csv/obs/orun[1]',
42
+ 'output/csip_run/out/Outlet.csv/output/catchmentSimRunoff')
43
+ }
44
+ ]
45
+ }
46
+ ]
47
+
48
+ # 2) static ages parameters
49
+ args = {
50
+ 'param': [
51
+ {
52
+ "name": "startTime",
53
+ "value": "2002-01-01"
54
+ },
55
+ {
56
+ "name": "endTime",
57
+ "value": "2006-12-31"
58
+ },
59
+ {
60
+ "name": "dataStartTime",
61
+ "value": "2002-01-01"
62
+ },
63
+ {
64
+ "name": "dataEndTime",
65
+ "value": "2006-12-31"
66
+ },
67
+ {
68
+ "name": "cal_startTime",
69
+ "value": "2003-01-01"
70
+ },
71
+ {
72
+ "name": "cal_endTime",
73
+ "value": "2006-12-31"
74
+ },
75
+ {
76
+ "name": "parallelismThreads",
77
+ "value": "2"
78
+ },
79
+ {
80
+ "name": "flagLoadState",
81
+ "value": "True"
82
+ },
83
+ {
84
+ "name": "payload",
85
+ "value": "false"
86
+ },
87
+ {
88
+ "name": "project",
89
+ "value": "SFIR3"
90
+ }
91
+ ],
92
+ # the service url
93
+ 'url': 'http://csip.engr.colostate.edu:8087/csip-oms/m/ages/0.3.0',
94
+
95
+ # the files to attach for each run
96
+ 'files': {}
97
+ }
98
+
99
+ # 3. perform optimization
100
+ optimizer, trace = global_best(steps, # step definition
101
+ rounds=(1, 2), # min/max number of rounds
102
+ args=args, # static arguments
103
+ n_particles=10, # number of particle candidates for each param
104
+ iters=20, # max # of iterations
105
+ n_threads=10, # number of threads to use
106
+ # ftol=0.00000001, # min cost function delta for convergence
107
+ options={'c1': 2, 'c2': 2, 'w': 0.8}, # hyperparameter
108
+ oh_strategy={ "w":'adaptive', "c1":'adaptive',"c2":'adaptive'}, # adaptive hyperparameter adjustments based on current and max # of iterations
109
+ conf={
110
+ 'service_timeout': 400.0,
111
+ 'http_retry': 5,
112
+ 'http_allow_redirects': True,
113
+ 'async_call': False,
114
+ 'http_conn_timeout': 10,
115
+ 'http_read_timeout': 400,
116
+ 'particles_fail': 5
117
+ }
118
+ )
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
  import codecs
3
3
  import os
4
4
 
5
- VERSION = '0.1.98'
5
+ VERSION = '0.1.101'
6
6
  DESCRIPTION = 'GUI for MG-PSO'
7
7
  LONG_DESCRIPTION = open('../README.md').read()
8
8
 
File without changes