scope 0.4.4__tar.gz → 0.4.6__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.
- {scope-0.4.4 → scope-0.4.6}/PKG-INFO +11 -7
- {scope-0.4.4 → scope-0.4.6}/README.md +59 -55
- {scope-0.4.4 → scope-0.4.6}/scope/__init__.py +1 -1
- scope-0.4.6/viewer/__main__.py +27 -0
- {scope-0.4.4 → scope-0.4.6}/viewer/config.py +2 -0
- scope-0.4.4/viewer/dist/assets/index-BZlTxr6y.js → scope-0.4.6/viewer/dist/assets/index-4w5RMjUC.js +8 -8
- scope-0.4.6/viewer/dist/assets/index-Bu2XixX9.css +1 -0
- {scope-0.4.4 → scope-0.4.6}/viewer/dist/index.html +2 -2
- {scope-0.4.4 → scope-0.4.6}/viewer/filesystems.py +58 -1
- {scope-0.4.4 → scope-0.4.6}/viewer/server.py +7 -0
- scope-0.4.4/viewer/__main__.py +0 -20
- scope-0.4.4/viewer/dist/assets/index-DlFPK5at.css +0 -1
- {scope-0.4.4 → scope-0.4.6}/requirements.txt +0 -0
- {scope-0.4.4 → scope-0.4.6}/scope/formats.py +0 -0
- {scope-0.4.4 → scope-0.4.6}/scope/reader.py +0 -0
- {scope-0.4.4 → scope-0.4.6}/scope/writer.py +0 -0
- {scope-0.4.4 → scope-0.4.6}/setup.py +0 -0
- {scope-0.4.4 → scope-0.4.6}/tests/test_float.py +0 -0
- {scope-0.4.4 → scope-0.4.6}/tests/test_image.py +0 -0
- {scope-0.4.4 → scope-0.4.6}/tests/test_video.py +0 -0
- {scope-0.4.4 → scope-0.4.6}/viewer/__init__.py +0 -0
- {scope-0.4.4 → scope-0.4.6}/viewer/dist/assets/material-symbols-DplPX30d.woff2 +0 -0
- {scope-0.4.4 → scope-0.4.6}/viewer/dist/favicon.png +0 -0
- {scope-0.4.4 → scope-0.4.6}/viewer/dist/logo.png +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: scope
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.6
|
|
4
4
|
Summary: Metrics logging and analysis
|
|
5
5
|
Home-page: http://github.com/danijar/scope
|
|
6
6
|
Classifier: Intended Audience :: Science/Research
|
|
@@ -17,10 +17,10 @@ Scalable metrics logging and analysis.
|
|
|
17
17
|
|
|
18
18
|
- 🚀 **Scalable:** Quickly log and view petabytes of metrics, thousands of keys, and large videos.
|
|
19
19
|
- 🎞️ **Formats:** Log and view scalars, text, images, and videos. Easy to extend with custom formats.
|
|
20
|
-
- 🧑🏻🔬 **Productivity:** Metrics viewer with focus on power users
|
|
20
|
+
- 🧑🏻🔬 **Productivity:** Metrics viewer with focus on power users with full keyboard support.
|
|
21
21
|
- ☁️ **Cloud support:** Directly write to and read from Cloud storage via pathlib interface.
|
|
22
22
|
- 🍃 **Lightweight:** The writer and reader measure only ~400 lines of Python code.
|
|
23
|
-
- 🧱 **
|
|
23
|
+
- 🧱 **Reliable:** Unit tested and used across diverse research projects.
|
|
24
24
|
|
|
25
25
|
## Usage
|
|
26
26
|
|
|
@@ -36,10 +36,14 @@ pip install scope
|
|
|
36
36
|
import scope
|
|
37
37
|
|
|
38
38
|
writer = scope.Writer(logdir)
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
writer.add(step, {
|
|
42
|
-
|
|
39
|
+
|
|
40
|
+
for step in range(3):
|
|
41
|
+
writer.add(step, {
|
|
42
|
+
'foo': 42,
|
|
43
|
+
'bar': np.zeros((100, 640, 360, 3), np.uint8),
|
|
44
|
+
'baz': 'Hello World',
|
|
45
|
+
})
|
|
46
|
+
writer.flush()
|
|
43
47
|
```
|
|
44
48
|
|
|
45
49
|
### Viewing
|
|
@@ -1,55 +1,59 @@
|
|
|
1
|
-
# 🔬 Scope
|
|
2
|
-
|
|
3
|
-
Scalable metrics logging and analysis.
|
|
4
|
-
|
|
5
|
-
## Features
|
|
6
|
-
|
|
7
|
-
- 🚀 **Scalable:** Quickly log and view petabytes of metrics, thousands of keys, and large videos.
|
|
8
|
-
- 🎞️ **Formats:** Log and view scalars, text, images, and videos. Easy to extend with custom formats.
|
|
9
|
-
- 🧑🏻🔬 **Productivity:** Metrics viewer with focus on power users
|
|
10
|
-
- ☁️ **Cloud support:** Directly write to and read from Cloud storage via pathlib interface.
|
|
11
|
-
- 🍃 **Lightweight:** The writer and reader measure only ~400 lines of Python code.
|
|
12
|
-
- 🧱 **
|
|
13
|
-
|
|
14
|
-
## Usage
|
|
15
|
-
|
|
16
|
-
### Installation
|
|
17
|
-
|
|
18
|
-
```sh
|
|
19
|
-
pip install scope
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
### Writing
|
|
23
|
-
|
|
24
|
-
```python
|
|
25
|
-
import scope
|
|
26
|
-
|
|
27
|
-
writer = scope.Writer(logdir)
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
writer.add(step, {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
print(
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
steps,
|
|
54
|
-
|
|
55
|
-
|
|
1
|
+
# 🔬 Scope
|
|
2
|
+
|
|
3
|
+
Scalable metrics logging and analysis.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- 🚀 **Scalable:** Quickly log and view petabytes of metrics, thousands of keys, and large videos.
|
|
8
|
+
- 🎞️ **Formats:** Log and view scalars, text, images, and videos. Easy to extend with custom formats.
|
|
9
|
+
- 🧑🏻🔬 **Productivity:** Metrics viewer with focus on power users with full keyboard support.
|
|
10
|
+
- ☁️ **Cloud support:** Directly write to and read from Cloud storage via pathlib interface.
|
|
11
|
+
- 🍃 **Lightweight:** The writer and reader measure only ~400 lines of Python code.
|
|
12
|
+
- 🧱 **Reliable:** Unit tested and used across diverse research projects.
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
### Installation
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
pip install scope
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Writing
|
|
23
|
+
|
|
24
|
+
```python
|
|
25
|
+
import scope
|
|
26
|
+
|
|
27
|
+
writer = scope.Writer(logdir)
|
|
28
|
+
|
|
29
|
+
for step in range(3):
|
|
30
|
+
writer.add(step, {
|
|
31
|
+
'foo': 42,
|
|
32
|
+
'bar': np.zeros((100, 640, 360, 3), np.uint8),
|
|
33
|
+
'baz': 'Hello World',
|
|
34
|
+
})
|
|
35
|
+
writer.flush()
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Viewing
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
python -m scope.viewer --basedir ... --port 8000
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Reading
|
|
45
|
+
|
|
46
|
+
```python
|
|
47
|
+
import scope
|
|
48
|
+
|
|
49
|
+
reader = scope.Reader(logdir)
|
|
50
|
+
print(reader.keys()) # ('foo', 'bar', 'baz')
|
|
51
|
+
|
|
52
|
+
print(reader.length('foo')) # 3
|
|
53
|
+
steps, values = reader['foo']
|
|
54
|
+
print(steps) # np.array([0, 1, 2], np.int64)
|
|
55
|
+
print(values) # np.array([42, 42, 42], np.float64)
|
|
56
|
+
|
|
57
|
+
steps, filenames = reader['bar']
|
|
58
|
+
reader.load('bar', filenames[-1]) # np.zeros((100, 640, 360, 3), np.uint8)
|
|
59
|
+
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import pathlib
|
|
3
|
+
import sys
|
|
4
|
+
|
|
5
|
+
import uvicorn
|
|
6
|
+
|
|
7
|
+
package = str(pathlib.Path(__file__).parent)
|
|
8
|
+
sys.path.insert(0, package)
|
|
9
|
+
from config import config
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def main():
|
|
13
|
+
|
|
14
|
+
# Uvicorn watches cwd for changes for reload.
|
|
15
|
+
os.chdir(package)
|
|
16
|
+
|
|
17
|
+
uvicorn.run(
|
|
18
|
+
'server:app',
|
|
19
|
+
host='0.0.0.0',
|
|
20
|
+
port=config.port,
|
|
21
|
+
reload=config.debug,
|
|
22
|
+
workers=None if config.debug else config.workers,
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
if __name__ == '__main__':
|
|
27
|
+
main()
|
|
@@ -7,6 +7,8 @@ config = elements.Flags(
|
|
|
7
7
|
port=int(os.environ.get('SCOPE_PORT', 8000)),
|
|
8
8
|
basedir=os.environ.get('SCOPE_BASEDIR', ''),
|
|
9
9
|
filesystem=os.environ.get('SCOPE_FILESYSTEM', 'elements'),
|
|
10
|
+
cachedir='/tmp/scope-cache',
|
|
11
|
+
cachesize=int(4e9), # 4 GB
|
|
10
12
|
maxdepth=2,
|
|
11
13
|
workers=32,
|
|
12
14
|
debug=False,
|