sciveo 0.0.41__tar.gz → 0.0.43__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 (37) hide show
  1. {sciveo-0.0.41 → sciveo-0.0.43}/PKG-INFO +1 -1
  2. {sciveo-0.0.41 → sciveo-0.0.43}/sciveo/monitoring/monitor.py +8 -59
  3. sciveo-0.0.43/sciveo/version.py +2 -0
  4. {sciveo-0.0.41 → sciveo-0.0.43}/sciveo.egg-info/PKG-INFO +1 -1
  5. sciveo-0.0.41/sciveo/version.py +0 -2
  6. {sciveo-0.0.41 → sciveo-0.0.43}/README.md +0 -0
  7. {sciveo-0.0.41 → sciveo-0.0.43}/sciveo/__init__.py +0 -0
  8. {sciveo-0.0.41 → sciveo-0.0.43}/sciveo/api/__init__.py +0 -0
  9. {sciveo-0.0.41 → sciveo-0.0.43}/sciveo/api/base.py +0 -0
  10. {sciveo-0.0.41 → sciveo-0.0.43}/sciveo/api/upload.py +0 -0
  11. {sciveo-0.0.41 → sciveo-0.0.43}/sciveo/common/__init__.py +0 -0
  12. {sciveo-0.0.41 → sciveo-0.0.43}/sciveo/common/configuration.py +0 -0
  13. {sciveo-0.0.41 → sciveo-0.0.43}/sciveo/common/model.py +0 -0
  14. {sciveo-0.0.41 → sciveo-0.0.43}/sciveo/common/optimizers.py +0 -0
  15. {sciveo-0.0.41 → sciveo-0.0.43}/sciveo/common/sampling.py +0 -0
  16. {sciveo-0.0.41 → sciveo-0.0.43}/sciveo/common/tools/__init__.py +0 -0
  17. {sciveo-0.0.41 → sciveo-0.0.43}/sciveo/common/tools/daemon.py +0 -0
  18. {sciveo-0.0.41 → sciveo-0.0.43}/sciveo/common/tools/formating.py +0 -0
  19. {sciveo-0.0.41 → sciveo-0.0.43}/sciveo/common/tools/hardware.py +0 -0
  20. {sciveo-0.0.41 → sciveo-0.0.43}/sciveo/common/tools/logger.py +0 -0
  21. {sciveo-0.0.41 → sciveo-0.0.43}/sciveo/common/tools/synchronized.py +0 -0
  22. {sciveo-0.0.41 → sciveo-0.0.43}/sciveo/content/__init__.py +0 -0
  23. {sciveo-0.0.41 → sciveo-0.0.43}/sciveo/content/dataset.py +0 -0
  24. {sciveo-0.0.41 → sciveo-0.0.43}/sciveo/content/experiment.py +0 -0
  25. {sciveo-0.0.41 → sciveo-0.0.43}/sciveo/content/project.py +0 -0
  26. {sciveo-0.0.41 → sciveo-0.0.43}/sciveo/content/runner.py +0 -0
  27. {sciveo-0.0.41 → sciveo-0.0.43}/sciveo/monitoring/__init__.py +0 -0
  28. {sciveo-0.0.41 → sciveo-0.0.43}/sciveo.egg-info/SOURCES.txt +0 -0
  29. {sciveo-0.0.41 → sciveo-0.0.43}/sciveo.egg-info/dependency_links.txt +0 -0
  30. {sciveo-0.0.41 → sciveo-0.0.43}/sciveo.egg-info/requires.txt +0 -0
  31. {sciveo-0.0.41 → sciveo-0.0.43}/sciveo.egg-info/top_level.txt +0 -0
  32. {sciveo-0.0.41 → sciveo-0.0.43}/setup.cfg +0 -0
  33. {sciveo-0.0.41 → sciveo-0.0.43}/setup.py +0 -0
  34. {sciveo-0.0.41 → sciveo-0.0.43}/test/test_configuration.py +0 -0
  35. {sciveo-0.0.41 → sciveo-0.0.43}/test/test_monitoring.py +0 -0
  36. {sciveo-0.0.41 → sciveo-0.0.43}/test/test_runner.py +0 -0
  37. {sciveo-0.0.41 → sciveo-0.0.43}/test/test_sampling.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sciveo
3
- Version: 0.0.41
3
+ Version: 0.0.43
4
4
  Description-Content-Type: text/markdown
5
5
  Provides-Extra: mon
6
6
 
@@ -34,23 +34,6 @@ class BaseMonitor(DaemonBase):
34
34
  "installed": self.data["RAM"]
35
35
  }
36
36
  self.data["LOG"] = {}
37
- self.data["sample"] = {}
38
-
39
- self.data["config"] = {
40
- "CPU usage": {"ratio": 1.0, "metric": "%", "ylim": [0.0, 100.0]},
41
- "CPU usage per core": {"ratio": 1.0, "metric": "%", "ylim": [0.0, 100.0]},
42
-
43
- "RAM used": {"ratio": 1.0 / (1024 * 1024 * 1024), "metric": "GB"},
44
-
45
- "GPU fan.speed": {"ratio": 1.0, "metric": "%", "ylim": [0.0, 100.0]},
46
- "GPU power.draw": {"ratio": 1.0, "metric": "W", "ylim": [0.0, 200.0]},
47
- "GPU memory.free": {"ratio": 1.0 / 1024, "metric": "GB"},
48
- "GPU memory.used": {"ratio": 1.0 / 1024, "metric": "GB"},
49
- "GPU temperature.gpu": {"ratio": 1.0, "metric": "°C"},
50
- "GPU utilization.gpu": {"ratio": 1.0, "metric": "%", "ylim": [0.0, 100.0]},
51
- "GPU utilization.memory": {"ratio": 1.0, "metric": "%", "ylim": [0.0, 100.0]},
52
- }
53
-
54
37
  self.list_logs = []
55
38
 
56
39
  self.api = APIRemoteClient()
@@ -74,7 +57,6 @@ class BaseMonitor(DaemonBase):
74
57
 
75
58
  self.tail_logs()
76
59
  self.data["local_time"] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
77
- self.data["sample"]["time"] = self.data["local_time"]
78
60
 
79
61
  api_result = self.api.POST_SCI("monitor", {"data": self.data})
80
62
 
@@ -86,13 +68,12 @@ class BaseMonitor(DaemonBase):
86
68
 
87
69
  def get_cpu_usage(self):
88
70
  usage_per_core = psutil.cpu_percent(interval=None, percpu=True)
89
- self.data["sample"]["CPU usage per core"] = usage_per_core
90
- self.data["sample"]["CPU usage"] = np.array(usage_per_core).mean()
71
+ self.data["CPU"]["usage per core"] = usage_per_core
72
+ self.data["CPU"]["usage"] = np.array(usage_per_core).mean()
91
73
 
92
74
  def get_memory(self):
93
75
  memory = psutil.virtual_memory()
94
- self.data["sample"]["RAM used"] = memory.used
95
- self.data["config"]["RAM used"]["ylim"] = [0, memory.total * self.data["config"]["RAM used"]["ratio"]]
76
+ self.data["RAM"]["used"] = memory.used
96
77
  self.data["RAM"]["total"] = memory.total
97
78
  self.data["RAM"]["free"] = memory.free
98
79
  self.data["RAM"]["print"] = f"total: {format_memory_size(memory.total)} used: {format_memory_size(memory.used)}"
@@ -133,47 +114,15 @@ class BaseMonitor(DaemonBase):
133
114
  [
134
115
  'nvidia-smi',
135
116
  '--query-gpu=gpu_uuid,gpu_name,index,power.draw,fan.speed,memory.total,memory.used,memory.free,utilization.gpu,utilization.memory,temperature.gpu',
136
- '--format=csv'
117
+ '--format=csv,nounits'
137
118
  ],
138
119
  capture_output=True, text=True, check=True
139
120
  )
140
121
 
141
122
  lines = result.stdout.strip().split('\n')
142
- header = lines[0].split(", ")
143
-
144
- keys = []
145
- gpu_keys = []
146
- for k in header:
147
- k_split = k.split(' ')
148
- key = k_split[0]
149
- keys.append(key)
150
- gpu_keys.append(f"GPU {key}")
151
-
152
- self.data.setdefault("GPU", {})
153
-
154
- for i in range(len(keys)):
155
- if gpu_keys[i] in self.data["config"]:
156
- self.data["sample"][gpu_keys[i]] = []
157
- else:
158
- self.data["GPU"][keys[i]] = []
159
-
160
- for i in range(1, len(lines)):
161
- line_values = lines[i].split(", ")
162
- for j, value in enumerate(line_values):
163
- value = value.split(' ')[0]
164
- try:
165
- value = float(value)
166
- except ValueError:
167
- pass
168
- if gpu_keys[j] in self.data["config"]:
169
- self.data["sample"][gpu_keys[j]].append(value)
170
- else:
171
- self.data["GPU"][keys[j]].append(value)
172
-
173
- if "memory.total" in self.data["GPU"]:
174
- for k in ["GPU memory.used", "GPU memory.free"]:
175
- self.data["config"][k]["ylim"] = [0, max(self.data["GPU"]["memory.total"]) * self.data["config"][k]["ratio"]]
176
-
123
+ self.data["GPU"] = {
124
+ "raw_lines": lines
125
+ }
177
126
  except Exception as e:
178
127
  pass
179
128
 
@@ -181,7 +130,7 @@ class BaseMonitor(DaemonBase):
181
130
 
182
131
 
183
132
  if __name__ == "__main__":
184
- mon = BaseMonitor(period=10)
133
+ mon = BaseMonitor(period=30)
185
134
  mon.start()
186
135
 
187
136
  while(True):
@@ -0,0 +1,2 @@
1
+
2
+ __version__ = '0.0.43'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sciveo
3
- Version: 0.0.41
3
+ Version: 0.0.43
4
4
  Description-Content-Type: text/markdown
5
5
  Provides-Extra: mon
6
6
 
@@ -1,2 +0,0 @@
1
-
2
- __version__ = '0.0.41'
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes