sciveo 0.0.44__tar.gz → 0.0.46__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.44 → sciveo-0.0.46}/PKG-INFO +12 -1
- {sciveo-0.0.44 → sciveo-0.0.46}/README.md +11 -0
- {sciveo-0.0.44 → sciveo-0.0.46}/sciveo/__init__.py +4 -7
- {sciveo-0.0.44 → sciveo-0.0.46}/sciveo/common/tools/hardware.py +10 -4
- {sciveo-0.0.44 → sciveo-0.0.46}/sciveo/monitoring/monitor.py +4 -5
- sciveo-0.0.46/sciveo/monitoring/start.py +57 -0
- sciveo-0.0.46/sciveo/version.py +2 -0
- {sciveo-0.0.44 → sciveo-0.0.46}/sciveo.egg-info/PKG-INFO +12 -1
- {sciveo-0.0.44 → sciveo-0.0.46}/sciveo.egg-info/SOURCES.txt +1 -0
- sciveo-0.0.44/sciveo/version.py +0 -2
- {sciveo-0.0.44 → sciveo-0.0.46}/sciveo/api/__init__.py +0 -0
- {sciveo-0.0.44 → sciveo-0.0.46}/sciveo/api/base.py +0 -0
- {sciveo-0.0.44 → sciveo-0.0.46}/sciveo/api/upload.py +0 -0
- {sciveo-0.0.44 → sciveo-0.0.46}/sciveo/common/__init__.py +0 -0
- {sciveo-0.0.44 → sciveo-0.0.46}/sciveo/common/configuration.py +0 -0
- {sciveo-0.0.44 → sciveo-0.0.46}/sciveo/common/model.py +0 -0
- {sciveo-0.0.44 → sciveo-0.0.46}/sciveo/common/optimizers.py +0 -0
- {sciveo-0.0.44 → sciveo-0.0.46}/sciveo/common/sampling.py +0 -0
- {sciveo-0.0.44 → sciveo-0.0.46}/sciveo/common/tools/__init__.py +0 -0
- {sciveo-0.0.44 → sciveo-0.0.46}/sciveo/common/tools/daemon.py +0 -0
- {sciveo-0.0.44 → sciveo-0.0.46}/sciveo/common/tools/formating.py +0 -0
- {sciveo-0.0.44 → sciveo-0.0.46}/sciveo/common/tools/logger.py +0 -0
- {sciveo-0.0.44 → sciveo-0.0.46}/sciveo/common/tools/synchronized.py +0 -0
- {sciveo-0.0.44 → sciveo-0.0.46}/sciveo/content/__init__.py +0 -0
- {sciveo-0.0.44 → sciveo-0.0.46}/sciveo/content/dataset.py +0 -0
- {sciveo-0.0.44 → sciveo-0.0.46}/sciveo/content/experiment.py +0 -0
- {sciveo-0.0.44 → sciveo-0.0.46}/sciveo/content/project.py +0 -0
- {sciveo-0.0.44 → sciveo-0.0.46}/sciveo/content/runner.py +0 -0
- {sciveo-0.0.44 → sciveo-0.0.46}/sciveo/monitoring/__init__.py +0 -0
- {sciveo-0.0.44 → sciveo-0.0.46}/sciveo.egg-info/dependency_links.txt +0 -0
- {sciveo-0.0.44 → sciveo-0.0.46}/sciveo.egg-info/requires.txt +0 -0
- {sciveo-0.0.44 → sciveo-0.0.46}/sciveo.egg-info/top_level.txt +0 -0
- {sciveo-0.0.44 → sciveo-0.0.46}/setup.cfg +0 -0
- {sciveo-0.0.44 → sciveo-0.0.46}/setup.py +0 -0
- {sciveo-0.0.44 → sciveo-0.0.46}/test/test_configuration.py +0 -0
- {sciveo-0.0.44 → sciveo-0.0.46}/test/test_monitoring.py +0 -0
- {sciveo-0.0.44 → sciveo-0.0.46}/test/test_runner.py +0 -0
- {sciveo-0.0.44 → sciveo-0.0.46}/test/test_sampling.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sciveo
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.46
|
|
4
4
|
Description-Content-Type: text/markdown
|
|
5
5
|
Provides-Extra: mon
|
|
6
6
|
|
|
@@ -10,6 +10,9 @@ Provides-Extra: mon
|
|
|
10
10
|
There are few configuration params samplers, which allows easy parameter tuning. The "auto" sampler perhaps is the easiest to use, but also
|
|
11
11
|
"random" and "grid" ones are available.
|
|
12
12
|
|
|
13
|
+
There is also the sciveo.monitor() which will start monitoring machine CPU/RAM/GPU etc.
|
|
14
|
+
|
|
15
|
+
|
|
13
16
|
## Features
|
|
14
17
|
|
|
15
18
|
- **Experiment Tracking:** Easily log and track your machine learning experiments.
|
|
@@ -19,8 +22,12 @@ There are few configuration params samplers, which allows easy parameter tuning.
|
|
|
19
22
|
|
|
20
23
|
## Installation
|
|
21
24
|
|
|
25
|
+
- main sciveo
|
|
22
26
|
pip install sciveo
|
|
23
27
|
|
|
28
|
+
- optional for sciveo monitoring
|
|
29
|
+
pip install sciveo[mon]
|
|
30
|
+
|
|
24
31
|
## Example usage
|
|
25
32
|
|
|
26
33
|
There are few public examples in sciveo.com.
|
|
@@ -30,6 +37,10 @@ The library has local and remote mode. The local one is ready to use, but for th
|
|
|
30
37
|
When have sciveo account:
|
|
31
38
|
export SCIVEO_SECRET_ACCESS_KEY='my_sciveo_user_auth_token'
|
|
32
39
|
|
|
40
|
+
When using sciveo monitoring just run, using suitable python environment
|
|
41
|
+
python -c "import sciveo; sciveo.monitor(period=120)"
|
|
42
|
+
|
|
43
|
+
When using sciveo experimental projects management
|
|
33
44
|
|
|
34
45
|
```python
|
|
35
46
|
|
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
There are few configuration params samplers, which allows easy parameter tuning. The "auto" sampler perhaps is the easiest to use, but also
|
|
5
5
|
"random" and "grid" ones are available.
|
|
6
6
|
|
|
7
|
+
There is also the sciveo.monitor() which will start monitoring machine CPU/RAM/GPU etc.
|
|
8
|
+
|
|
9
|
+
|
|
7
10
|
## Features
|
|
8
11
|
|
|
9
12
|
- **Experiment Tracking:** Easily log and track your machine learning experiments.
|
|
@@ -13,8 +16,12 @@ There are few configuration params samplers, which allows easy parameter tuning.
|
|
|
13
16
|
|
|
14
17
|
## Installation
|
|
15
18
|
|
|
19
|
+
- main sciveo
|
|
16
20
|
pip install sciveo
|
|
17
21
|
|
|
22
|
+
- optional for sciveo monitoring
|
|
23
|
+
pip install sciveo[mon]
|
|
24
|
+
|
|
18
25
|
## Example usage
|
|
19
26
|
|
|
20
27
|
There are few public examples in sciveo.com.
|
|
@@ -24,6 +31,10 @@ The library has local and remote mode. The local one is ready to use, but for th
|
|
|
24
31
|
When have sciveo account:
|
|
25
32
|
export SCIVEO_SECRET_ACCESS_KEY='my_sciveo_user_auth_token'
|
|
26
33
|
|
|
34
|
+
When using sciveo monitoring just run, using suitable python environment
|
|
35
|
+
python -c "import sciveo; sciveo.monitor(period=120)"
|
|
36
|
+
|
|
37
|
+
When using sciveo experimental projects management
|
|
27
38
|
|
|
28
39
|
```python
|
|
29
40
|
|
|
@@ -20,12 +20,11 @@ try:
|
|
|
20
20
|
from sciveo.common.tools.daemon import TasksDaemon, __upload_content__
|
|
21
21
|
from sciveo.content.runner import ProjectRunner
|
|
22
22
|
from sciveo.content.dataset import Dataset
|
|
23
|
-
from sciveo.monitoring.
|
|
23
|
+
from sciveo.monitoring.start import MonitorStart
|
|
24
24
|
from sciveo.version import __version__
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
TasksDaemon.current = TasksDaemon(num_threads=int(os.environ.get("SCIVEO_TASKS_NUM_THREADS", 1)))
|
|
28
|
-
TasksDaemon.current.start()
|
|
29
28
|
|
|
30
29
|
|
|
31
30
|
# New Experiment
|
|
@@ -36,6 +35,7 @@ try:
|
|
|
36
35
|
error("there is no started project")
|
|
37
36
|
|
|
38
37
|
def start(project, function, configuration={}, **kwargs):
|
|
38
|
+
TasksDaemon.current.start()
|
|
39
39
|
ProjectRunner.current = ProjectRunner(project=project, function=function, configuration=configuration, **kwargs)
|
|
40
40
|
ProjectRunner.current.run()
|
|
41
41
|
|
|
@@ -44,11 +44,8 @@ try:
|
|
|
44
44
|
return Dataset.get(info)
|
|
45
45
|
|
|
46
46
|
# Monitoring start
|
|
47
|
-
def monitor(
|
|
48
|
-
|
|
49
|
-
mon.start()
|
|
50
|
-
while(True):
|
|
51
|
-
time.sleep(60)
|
|
47
|
+
def monitor(**kwargs):
|
|
48
|
+
MonitorStart(**kwargs)()
|
|
52
49
|
|
|
53
50
|
except ImportError as e:
|
|
54
51
|
pass
|
|
@@ -32,19 +32,25 @@ def new_guid(num_characters=32):
|
|
|
32
32
|
|
|
33
33
|
class HardwareInfo:
|
|
34
34
|
def __init__(self):
|
|
35
|
-
self.data = {
|
|
36
|
-
"CPU": {"count": os.cpu_count()},
|
|
37
|
-
"RAM": format_memory_size(os.sysconf('SC_PAGE_SIZE') * os.sysconf('SC_PHYS_PAGES'))
|
|
38
|
-
}
|
|
35
|
+
self.data = {}
|
|
39
36
|
|
|
40
37
|
self.get_cpu()
|
|
38
|
+
self.get_ram()
|
|
41
39
|
|
|
42
40
|
def __call__(self):
|
|
43
41
|
return self.data
|
|
44
42
|
|
|
43
|
+
def get_ram(self):
|
|
44
|
+
try:
|
|
45
|
+
self.data["RAM"] = format_memory_size(os.sysconf('SC_PAGE_SIZE') * os.sysconf('SC_PHYS_PAGES'))
|
|
46
|
+
except Exception:
|
|
47
|
+
pass
|
|
48
|
+
|
|
45
49
|
def get_cpu(self):
|
|
46
50
|
list_keys = ["model name", "stepping", "cpu MHz", "cache size", "siblings", "cpu cores", "bogomips"]
|
|
47
51
|
try:
|
|
52
|
+
self.data["CPU"] = {"count": os.cpu_count()}
|
|
53
|
+
|
|
48
54
|
cpu_info = {}
|
|
49
55
|
with open('/proc/cpuinfo', 'r') as file:
|
|
50
56
|
lines = file.readlines()
|
|
@@ -31,9 +31,7 @@ class BaseMonitor(DaemonBase):
|
|
|
31
31
|
|
|
32
32
|
self.data = HardwareInfo()()
|
|
33
33
|
self.data.setdefault("CPU", {})
|
|
34
|
-
self.data["RAM"] = {
|
|
35
|
-
"installed": self.data["RAM"]
|
|
36
|
-
}
|
|
34
|
+
self.data["RAM"] = {}
|
|
37
35
|
self.data["LOG"] = {}
|
|
38
36
|
self.list_logs = []
|
|
39
37
|
|
|
@@ -46,7 +44,7 @@ class BaseMonitor(DaemonBase):
|
|
|
46
44
|
|
|
47
45
|
machine_serial = self.getserial()
|
|
48
46
|
|
|
49
|
-
debug(type(self).__name__, "init", machine_serial, "initial_cpu_usage", initial_cpu_usage)
|
|
47
|
+
debug(type(self).__name__, f"init monitor with period={period}", machine_serial, "initial_cpu_usage", initial_cpu_usage)
|
|
50
48
|
|
|
51
49
|
def __call__(self):
|
|
52
50
|
return self.data
|
|
@@ -77,6 +75,7 @@ class BaseMonitor(DaemonBase):
|
|
|
77
75
|
self.data["RAM"]["used"] = memory.used
|
|
78
76
|
self.data["RAM"]["total"] = memory.total
|
|
79
77
|
self.data["RAM"]["free"] = memory.free
|
|
78
|
+
self.data["RAM"]["installed"] = format_memory_size(memory.total)
|
|
80
79
|
self.data["RAM"]["print"] = f"total: {format_memory_size(memory.total)} used: {format_memory_size(memory.used)}"
|
|
81
80
|
|
|
82
81
|
def getserial(self):
|
|
@@ -87,7 +86,7 @@ class BaseMonitor(DaemonBase):
|
|
|
87
86
|
pass
|
|
88
87
|
if machine_serial is None:
|
|
89
88
|
try:
|
|
90
|
-
machine_serial =
|
|
89
|
+
machine_serial = f"UUID-{uuid.getnode()}"
|
|
91
90
|
except Exception:
|
|
92
91
|
pass
|
|
93
92
|
if machine_serial is None:
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import time
|
|
3
|
+
|
|
4
|
+
from sciveo.common.tools.logger import *
|
|
5
|
+
from sciveo.monitoring.monitor import BaseMonitor
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class MonitorStart:
|
|
9
|
+
def __init__(self, **kwargs):
|
|
10
|
+
self.default_arguments = {
|
|
11
|
+
"period": 120,
|
|
12
|
+
"block": True,
|
|
13
|
+
"fork": False,
|
|
14
|
+
"fork_type": 0
|
|
15
|
+
}
|
|
16
|
+
self.arguments = {}
|
|
17
|
+
for k, v in self.default_arguments.items():
|
|
18
|
+
self.arguments[k] = kwargs.get(k, v)
|
|
19
|
+
|
|
20
|
+
if len(kwargs) == 0:
|
|
21
|
+
info("sciveo monitoring default options", self.default_arguments)
|
|
22
|
+
|
|
23
|
+
def __call__(self):
|
|
24
|
+
if self.arguments["fork"] and self.arguments["block"]:
|
|
25
|
+
self.fork()
|
|
26
|
+
self.start()
|
|
27
|
+
|
|
28
|
+
def start_multiprocessing(self):
|
|
29
|
+
self.start()
|
|
30
|
+
def start_fork(self):
|
|
31
|
+
os.setsid()
|
|
32
|
+
self.start()
|
|
33
|
+
def fork(self):
|
|
34
|
+
if self.arguments["fork_type"] == 0:
|
|
35
|
+
import multiprocessing
|
|
36
|
+
background_process = multiprocessing.Process(target=self.start_multiprocessing)
|
|
37
|
+
background_process.daemon = True
|
|
38
|
+
background_process.start()
|
|
39
|
+
info("monitoring service started with", self.arguments)
|
|
40
|
+
exit()
|
|
41
|
+
else:
|
|
42
|
+
pid = os.fork()
|
|
43
|
+
if pid == 0:
|
|
44
|
+
self.start_fork()
|
|
45
|
+
else:
|
|
46
|
+
info("sciveo monitor service started with pid", pid, self.arguments)
|
|
47
|
+
exit()
|
|
48
|
+
|
|
49
|
+
def start(self):
|
|
50
|
+
period = max(self.arguments["period"], 5)
|
|
51
|
+
mon = BaseMonitor(period=period)
|
|
52
|
+
mon.start()
|
|
53
|
+
mon.join()
|
|
54
|
+
|
|
55
|
+
if self.arguments["block"]:
|
|
56
|
+
while(True):
|
|
57
|
+
time.sleep(60)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sciveo
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.46
|
|
4
4
|
Description-Content-Type: text/markdown
|
|
5
5
|
Provides-Extra: mon
|
|
6
6
|
|
|
@@ -10,6 +10,9 @@ Provides-Extra: mon
|
|
|
10
10
|
There are few configuration params samplers, which allows easy parameter tuning. The "auto" sampler perhaps is the easiest to use, but also
|
|
11
11
|
"random" and "grid" ones are available.
|
|
12
12
|
|
|
13
|
+
There is also the sciveo.monitor() which will start monitoring machine CPU/RAM/GPU etc.
|
|
14
|
+
|
|
15
|
+
|
|
13
16
|
## Features
|
|
14
17
|
|
|
15
18
|
- **Experiment Tracking:** Easily log and track your machine learning experiments.
|
|
@@ -19,8 +22,12 @@ There are few configuration params samplers, which allows easy parameter tuning.
|
|
|
19
22
|
|
|
20
23
|
## Installation
|
|
21
24
|
|
|
25
|
+
- main sciveo
|
|
22
26
|
pip install sciveo
|
|
23
27
|
|
|
28
|
+
- optional for sciveo monitoring
|
|
29
|
+
pip install sciveo[mon]
|
|
30
|
+
|
|
24
31
|
## Example usage
|
|
25
32
|
|
|
26
33
|
There are few public examples in sciveo.com.
|
|
@@ -30,6 +37,10 @@ The library has local and remote mode. The local one is ready to use, but for th
|
|
|
30
37
|
When have sciveo account:
|
|
31
38
|
export SCIVEO_SECRET_ACCESS_KEY='my_sciveo_user_auth_token'
|
|
32
39
|
|
|
40
|
+
When using sciveo monitoring just run, using suitable python environment
|
|
41
|
+
python -c "import sciveo; sciveo.monitor(period=120)"
|
|
42
|
+
|
|
43
|
+
When using sciveo experimental projects management
|
|
33
44
|
|
|
34
45
|
```python
|
|
35
46
|
|
sciveo-0.0.44/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
|