sciveo 0.0.40__tar.gz → 0.0.42__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.
- {sciveo-0.0.40 → sciveo-0.0.42}/PKG-INFO +1 -1
- {sciveo-0.0.40 → sciveo-0.0.42}/sciveo/monitoring/monitor.py +6 -57
- sciveo-0.0.42/sciveo/version.py +2 -0
- {sciveo-0.0.40 → sciveo-0.0.42}/sciveo.egg-info/PKG-INFO +1 -1
- sciveo-0.0.40/sciveo/version.py +0 -2
- {sciveo-0.0.40 → sciveo-0.0.42}/README.md +0 -0
- {sciveo-0.0.40 → sciveo-0.0.42}/sciveo/__init__.py +0 -0
- {sciveo-0.0.40 → sciveo-0.0.42}/sciveo/api/__init__.py +0 -0
- {sciveo-0.0.40 → sciveo-0.0.42}/sciveo/api/base.py +0 -0
- {sciveo-0.0.40 → sciveo-0.0.42}/sciveo/api/upload.py +0 -0
- {sciveo-0.0.40 → sciveo-0.0.42}/sciveo/common/__init__.py +0 -0
- {sciveo-0.0.40 → sciveo-0.0.42}/sciveo/common/configuration.py +0 -0
- {sciveo-0.0.40 → sciveo-0.0.42}/sciveo/common/model.py +0 -0
- {sciveo-0.0.40 → sciveo-0.0.42}/sciveo/common/optimizers.py +0 -0
- {sciveo-0.0.40 → sciveo-0.0.42}/sciveo/common/sampling.py +0 -0
- {sciveo-0.0.40 → sciveo-0.0.42}/sciveo/common/tools/__init__.py +0 -0
- {sciveo-0.0.40 → sciveo-0.0.42}/sciveo/common/tools/daemon.py +0 -0
- {sciveo-0.0.40 → sciveo-0.0.42}/sciveo/common/tools/formating.py +0 -0
- {sciveo-0.0.40 → sciveo-0.0.42}/sciveo/common/tools/hardware.py +0 -0
- {sciveo-0.0.40 → sciveo-0.0.42}/sciveo/common/tools/logger.py +0 -0
- {sciveo-0.0.40 → sciveo-0.0.42}/sciveo/common/tools/synchronized.py +0 -0
- {sciveo-0.0.40 → sciveo-0.0.42}/sciveo/content/__init__.py +0 -0
- {sciveo-0.0.40 → sciveo-0.0.42}/sciveo/content/dataset.py +0 -0
- {sciveo-0.0.40 → sciveo-0.0.42}/sciveo/content/experiment.py +0 -0
- {sciveo-0.0.40 → sciveo-0.0.42}/sciveo/content/project.py +0 -0
- {sciveo-0.0.40 → sciveo-0.0.42}/sciveo/content/runner.py +0 -0
- {sciveo-0.0.40 → sciveo-0.0.42}/sciveo/monitoring/__init__.py +0 -0
- {sciveo-0.0.40 → sciveo-0.0.42}/sciveo.egg-info/SOURCES.txt +0 -0
- {sciveo-0.0.40 → sciveo-0.0.42}/sciveo.egg-info/dependency_links.txt +0 -0
- {sciveo-0.0.40 → sciveo-0.0.42}/sciveo.egg-info/requires.txt +0 -0
- {sciveo-0.0.40 → sciveo-0.0.42}/sciveo.egg-info/top_level.txt +0 -0
- {sciveo-0.0.40 → sciveo-0.0.42}/setup.cfg +0 -0
- {sciveo-0.0.40 → sciveo-0.0.42}/setup.py +0 -0
- {sciveo-0.0.40 → sciveo-0.0.42}/test/test_configuration.py +0 -0
- {sciveo-0.0.40 → sciveo-0.0.42}/test/test_monitoring.py +0 -0
- {sciveo-0.0.40 → sciveo-0.0.42}/test/test_runner.py +0 -0
- {sciveo-0.0.40 → sciveo-0.0.42}/test/test_sampling.py +0 -0
|
@@ -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["
|
|
90
|
-
self.data["
|
|
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["
|
|
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)}"
|
|
@@ -139,41 +120,9 @@ class BaseMonitor(DaemonBase):
|
|
|
139
120
|
)
|
|
140
121
|
|
|
141
122
|
lines = result.stdout.strip().split('\n')
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
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[j]] = []
|
|
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
|
|
sciveo-0.0.40/sciveo/version.py
DELETED
|
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
|
|
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
|
|
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
|