ml-dash 0.1.28__tar.gz → 0.6.1__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 (83) hide show
  1. ml_dash-0.6.1/LICENSE +21 -0
  2. ml_dash-0.6.1/PKG-INFO +248 -0
  3. ml_dash-0.6.1/README.md +181 -0
  4. ml_dash-0.6.1/pyproject.toml +66 -0
  5. ml_dash-0.6.1/src/ml_dash/__init__.py +85 -0
  6. ml_dash-0.6.1/src/ml_dash/auth/__init__.py +51 -0
  7. ml_dash-0.6.1/src/ml_dash/auth/constants.py +10 -0
  8. ml_dash-0.6.1/src/ml_dash/auth/device_flow.py +237 -0
  9. ml_dash-0.6.1/src/ml_dash/auth/device_secret.py +49 -0
  10. ml_dash-0.6.1/src/ml_dash/auth/exceptions.py +31 -0
  11. ml_dash-0.6.1/src/ml_dash/auth/token_storage.py +262 -0
  12. ml_dash-0.6.1/src/ml_dash/auto_start.py +52 -0
  13. ml_dash-0.6.1/src/ml_dash/cli.py +79 -0
  14. ml_dash-0.6.1/src/ml_dash/cli_commands/__init__.py +1 -0
  15. ml_dash-0.6.1/src/ml_dash/cli_commands/download.py +769 -0
  16. ml_dash-0.6.1/src/ml_dash/cli_commands/list.py +319 -0
  17. ml_dash-0.6.1/src/ml_dash/cli_commands/login.py +225 -0
  18. ml_dash-0.6.1/src/ml_dash/cli_commands/logout.py +54 -0
  19. ml_dash-0.6.1/src/ml_dash/cli_commands/upload.py +1248 -0
  20. ml_dash-0.6.1/src/ml_dash/client.py +1003 -0
  21. ml_dash-0.6.1/src/ml_dash/config.py +133 -0
  22. ml_dash-0.6.1/src/ml_dash/experiment.py +1116 -0
  23. ml_dash-0.6.1/src/ml_dash/files.py +785 -0
  24. ml_dash-0.6.1/src/ml_dash/log.py +181 -0
  25. ml_dash-0.6.1/src/ml_dash/metric.py +481 -0
  26. ml_dash-0.6.1/src/ml_dash/params.py +277 -0
  27. ml_dash-0.6.1/src/ml_dash/remote_auto_start.py +55 -0
  28. ml_dash-0.6.1/src/ml_dash/storage.py +1127 -0
  29. ml-dash-0.1.28/MANIFEST.in +0 -2
  30. ml-dash-0.1.28/PKG-INFO +0 -67
  31. ml-dash-0.1.28/README +0 -53
  32. ml-dash-0.1.28/VERSION +0 -1
  33. ml-dash-0.1.28/ml_dash/__init__.py +0 -1
  34. ml-dash-0.1.28/ml_dash/app.py +0 -72
  35. ml-dash-0.1.28/ml_dash/client-dist/asset-manifest.json +0 -15
  36. ml-dash-0.1.28/ml_dash/client-dist/favicon.ico +0 -0
  37. ml-dash-0.1.28/ml_dash/client-dist/github-markdown.css +0 -957
  38. ml-dash-0.1.28/ml_dash/client-dist/index.html +0 -1
  39. ml-dash-0.1.28/ml_dash/client-dist/manifest.json +0 -15
  40. ml-dash-0.1.28/ml_dash/client-dist/monaco-editor-worker-loader-proxy.js +0 -6
  41. ml-dash-0.1.28/ml_dash/client-dist/precache-manifest.0e7c640046d30a3ac923fa68fa9ae965.js +0 -26
  42. ml-dash-0.1.28/ml_dash/client-dist/service-worker.js +0 -34
  43. ml-dash-0.1.28/ml_dash/client-dist/static/css/1.340ebab9.chunk.css +0 -2
  44. ml-dash-0.1.28/ml_dash/client-dist/static/css/1.340ebab9.chunk.css.map +0 -1
  45. ml-dash-0.1.28/ml_dash/client-dist/static/css/main.4e7f7702.chunk.css +0 -2
  46. ml-dash-0.1.28/ml_dash/client-dist/static/css/main.4e7f7702.chunk.css.map +0 -1
  47. ml-dash-0.1.28/ml_dash/client-dist/static/js/1.fc6c296e.chunk.js +0 -2
  48. ml-dash-0.1.28/ml_dash/client-dist/static/js/1.fc6c296e.chunk.js.map +0 -1
  49. ml-dash-0.1.28/ml_dash/client-dist/static/js/main.af8864ef.chunk.js +0 -2
  50. ml-dash-0.1.28/ml_dash/client-dist/static/js/main.af8864ef.chunk.js.map +0 -1
  51. ml-dash-0.1.28/ml_dash/client-dist/static/js/runtime~main.229c360f.js +0 -2
  52. ml-dash-0.1.28/ml_dash/client-dist/static/js/runtime~main.229c360f.js.map +0 -1
  53. ml-dash-0.1.28/ml_dash/config.py +0 -16
  54. ml-dash-0.1.28/ml_dash/file_events.py +0 -71
  55. ml-dash-0.1.28/ml_dash/file_handlers.py +0 -141
  56. ml-dash-0.1.28/ml_dash/file_utils.py +0 -5
  57. ml-dash-0.1.28/ml_dash/file_watcher.py +0 -30
  58. ml-dash-0.1.28/ml_dash/mime_types.py +0 -20
  59. ml-dash-0.1.28/ml_dash/schema/__init__.py +0 -109
  60. ml-dash-0.1.28/ml_dash/schema/archive.py +0 -165
  61. ml-dash-0.1.28/ml_dash/schema/directories.py +0 -59
  62. ml-dash-0.1.28/ml_dash/schema/experiments.py +0 -77
  63. ml-dash-0.1.28/ml_dash/schema/files/__init__.py +0 -203
  64. ml-dash-0.1.28/ml_dash/schema/files/file_helpers.py +0 -79
  65. ml-dash-0.1.28/ml_dash/schema/files/images.py +0 -27
  66. ml-dash-0.1.28/ml_dash/schema/files/metrics.py +0 -68
  67. ml-dash-0.1.28/ml_dash/schema/files/parameters.py +0 -50
  68. ml-dash-0.1.28/ml_dash/schema/files/series.py +0 -235
  69. ml-dash-0.1.28/ml_dash/schema/files/videos.py +0 -27
  70. ml-dash-0.1.28/ml_dash/schema/helpers.py +0 -66
  71. ml-dash-0.1.28/ml_dash/schema/projects.py +0 -65
  72. ml-dash-0.1.28/ml_dash/schema/schema_helpers.py +0 -19
  73. ml-dash-0.1.28/ml_dash/schema/users.py +0 -33
  74. ml-dash-0.1.28/ml_dash/server.py +0 -60
  75. ml-dash-0.1.28/ml_dash/sse.py +0 -18
  76. ml-dash-0.1.28/ml_dash.egg-info/PKG-INFO +0 -67
  77. ml-dash-0.1.28/ml_dash.egg-info/SOURCES.txt +0 -53
  78. ml-dash-0.1.28/ml_dash.egg-info/dependency_links.txt +0 -1
  79. ml-dash-0.1.28/ml_dash.egg-info/requires.txt +0 -17
  80. ml-dash-0.1.28/ml_dash.egg-info/top_level.txt +0 -1
  81. ml-dash-0.1.28/setup.cfg +0 -4
  82. ml-dash-0.1.28/setup.py +0 -55
  83. /ml-dash-0.1.28/ml_dash/example.py → /ml_dash-0.6.1/src/ml_dash/py.typed +0 -0
ml_dash-0.6.1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Ge Yang, Tom Tao
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
ml_dash-0.6.1/PKG-INFO ADDED
@@ -0,0 +1,248 @@
1
+ Metadata-Version: 2.3
2
+ Name: ml-dash
3
+ Version: 0.6.1
4
+ Summary: ML experiment tracking and data storage
5
+ Keywords: machine-learning,experiment-tracking,mlops,data-storage
6
+ Author: Ge Yang, Tom Tao
7
+ License: MIT License
8
+
9
+ Copyright (c) 2025 Ge Yang, Tom Tao
10
+
11
+ Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ of this software and associated documentation files (the "Software"), to deal
13
+ in the Software without restriction, including without limitation the rights
14
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ copies of the Software, and to permit persons to whom the Software is
16
+ furnished to do so, subject to the following conditions:
17
+
18
+ The above copyright notice and this permission notice shall be included in all
19
+ copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
+ SOFTWARE.
28
+ Classifier: Development Status :: 4 - Beta
29
+ Classifier: Intended Audience :: Developers
30
+ Classifier: Intended Audience :: Science/Research
31
+ Classifier: License :: OSI Approved :: MIT License
32
+ Classifier: Programming Language :: Python :: 3
33
+ Classifier: Programming Language :: Python :: 3.9
34
+ Classifier: Programming Language :: Python :: 3.10
35
+ Classifier: Programming Language :: Python :: 3.11
36
+ Classifier: Programming Language :: Python :: 3.12
37
+ Classifier: Programming Language :: Python :: 3.13
38
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
39
+ Requires-Dist: httpx>=0.27.0
40
+ Requires-Dist: pyjwt>=2.8.0
41
+ Requires-Dist: imageio>=2.31.0
42
+ Requires-Dist: imageio-ffmpeg>=0.4.9
43
+ Requires-Dist: scikit-image>=0.21.0
44
+ Requires-Dist: rich>=13.0.0
45
+ Requires-Dist: cryptography>=42.0.0
46
+ Requires-Dist: keyring>=25.0.0 ; extra == 'auth'
47
+ Requires-Dist: qrcode>=8.0.0 ; extra == 'auth'
48
+ Requires-Dist: pytest>=8.0.0 ; extra == 'dev'
49
+ Requires-Dist: pytest-asyncio>=0.23.0 ; extra == 'dev'
50
+ Requires-Dist: sphinx>=7.2.0 ; extra == 'dev'
51
+ Requires-Dist: furo>=2024.0.0 ; extra == 'dev'
52
+ Requires-Dist: sphinx-autodoc-typehints>=2.0.0 ; extra == 'dev'
53
+ Requires-Dist: sphinx-autobuild>=2024.0.0 ; extra == 'dev'
54
+ Requires-Dist: sphinx-copybutton>=0.5.0 ; extra == 'dev'
55
+ Requires-Dist: sphinx-design>=0.5.0 ; extra == 'dev'
56
+ Requires-Dist: sphinx-tabs>=3.4.0 ; extra == 'dev'
57
+ Requires-Dist: sphinxcontrib-mermaid>=0.9.0 ; extra == 'dev'
58
+ Requires-Dist: sphinxext-opengraph>=0.9.0 ; extra == 'dev'
59
+ Requires-Dist: myst-parser>=2.0.0 ; extra == 'dev'
60
+ Requires-Dist: linkify-it-py>=2.0.0 ; extra == 'dev'
61
+ Requires-Dist: ruff>=0.3.0 ; extra == 'dev'
62
+ Requires-Dist: mypy>=1.9.0 ; extra == 'dev'
63
+ Requires-Python: >=3.9
64
+ Provides-Extra: auth
65
+ Provides-Extra: dev
66
+ Description-Content-Type: text/markdown
67
+
68
+ # ML-Dash
69
+
70
+ A simple and flexible SDK for ML experiment metricing and data storage.
71
+
72
+ ## Features
73
+
74
+ - **Three Usage Styles**: Decorator, context manager, or direct instantiation
75
+ - **Dual Operation Modes**: Remote (API server) or local (filesystem)
76
+ - **Auto-creation**: Automatically creates namespace, project, and folder hierarchy
77
+ - **Upsert Behavior**: Updates existing experiments or creates new ones
78
+ - **Experiment Lifecycle**: Automatic status tracking (RUNNING, COMPLETED, FAILED, CANCELLED)
79
+ - **Organized File Storage**: Prefix-based file organization with unique snowflake IDs
80
+ - **Rich Metadata**: Tags, bindrs, descriptions, and custom metadata support
81
+ - **Simple API**: Minimal configuration, maximum flexibility
82
+
83
+ ## Installation
84
+
85
+ <table>
86
+ <tr>
87
+ <td>Using uv (recommended)</td>
88
+ <td>Using pip</td>
89
+ </tr>
90
+ <tr>
91
+ <td>
92
+
93
+ ```bash
94
+ uv add ml-dash
95
+ ```
96
+
97
+ </td>
98
+ <td>
99
+
100
+ ```bash
101
+ pip install ml-dash
102
+ ```
103
+
104
+ </td>
105
+ </tr>
106
+ </table>
107
+
108
+ ## Getting Started
109
+
110
+ ### Remote Mode (with API Server)
111
+
112
+ ```python
113
+ from ml_dash import Experiment
114
+
115
+ with Experiment(
116
+ name="my-experiment",
117
+ project="my-project",
118
+ remote="https://api.dash.ml",
119
+ api_key="your-jwt-token"
120
+ ) as experiment:
121
+ print(f"Experiment ID: {experiment.id}")
122
+ ```
123
+
124
+ ### Local Mode (Filesystem)
125
+
126
+ ```python
127
+ from ml_dash import Experiment
128
+
129
+ with Experiment(
130
+ name="my-experiment",
131
+ project="my-project",
132
+ local_path=".ml-dash"
133
+ ) as experiment:
134
+ pass # Your code here
135
+ ```
136
+
137
+ See [examples/](examples/) for more complete examples.
138
+
139
+ ## Development Setup
140
+
141
+ ### Installing Dev Dependencies
142
+
143
+ To contribute to ML-Dash or run tests, install the development dependencies:
144
+
145
+ <table>
146
+ <tr>
147
+ <td>Using uv (recommended)</td>
148
+ <td>Using pip</td>
149
+ </tr>
150
+ <tr>
151
+ <td>
152
+
153
+ ```bash
154
+ uv sync --extra dev
155
+ ```
156
+
157
+ </td>
158
+ <td>
159
+
160
+ ```bash
161
+ pip install -e ".[dev]"
162
+ ```
163
+
164
+ </td>
165
+ </tr>
166
+ </table>
167
+
168
+ This installs:
169
+ - `pytest>=8.0.0` - Testing framework
170
+ - `pytest-asyncio>=0.23.0` - Async test support
171
+ - `sphinx>=7.2.0` - Documentation builder
172
+ - `sphinx-rtd-theme>=2.0.0` - Read the Docs theme
173
+ - `sphinx-autobuild>=2024.0.0` - Live preview for documentation
174
+ - `myst-parser>=2.0.0` - Markdown support for Sphinx
175
+ - `ruff>=0.3.0` - Linter and formatter
176
+ - `mypy>=1.9.0` - Type checker
177
+
178
+ ### Running Tests
179
+
180
+ <table>
181
+ <tr>
182
+ <td>Using uv</td>
183
+ <td>Using pytest directly</td>
184
+ </tr>
185
+ <tr>
186
+ <td>
187
+
188
+ ```bash
189
+ uv run pytest
190
+ ```
191
+
192
+ </td>
193
+ <td>
194
+
195
+ ```bash
196
+ pytest
197
+ ```
198
+
199
+ </td>
200
+ </tr>
201
+ </table>
202
+
203
+ ### Building Documentation
204
+
205
+ Documentation is built using Sphinx with Read the Docs theme.
206
+
207
+ <table>
208
+ <tr>
209
+ <td>Build docs</td>
210
+ <td>Live preview</td>
211
+ <td>Clean build</td>
212
+ </tr>
213
+ <tr>
214
+ <td>
215
+
216
+ ```bash
217
+ uv run python -m sphinx -b html docs docs/_build/html
218
+ ```
219
+
220
+ </td>
221
+ <td>
222
+
223
+ ```bash
224
+ uv run sphinx-autobuild docs docs/_build/html
225
+ ```
226
+
227
+ </td>
228
+ <td>
229
+
230
+ ```bash
231
+ rm -rf docs/_build
232
+ ```
233
+
234
+ </td>
235
+ </tr>
236
+ </table>
237
+
238
+ The live preview command starts a local server and automatically rebuilds when files change.
239
+
240
+ Alternatively, you can use the Makefile from within the docs directory:
241
+
242
+ ```bash
243
+ cd docs
244
+ make html # Build HTML documentation
245
+ make clean # Clean build files
246
+ ```
247
+
248
+ For maintainers, to build and publish a new release: `uv build && uv publish`
@@ -0,0 +1,181 @@
1
+ # ML-Dash
2
+
3
+ A simple and flexible SDK for ML experiment metricing and data storage.
4
+
5
+ ## Features
6
+
7
+ - **Three Usage Styles**: Decorator, context manager, or direct instantiation
8
+ - **Dual Operation Modes**: Remote (API server) or local (filesystem)
9
+ - **Auto-creation**: Automatically creates namespace, project, and folder hierarchy
10
+ - **Upsert Behavior**: Updates existing experiments or creates new ones
11
+ - **Experiment Lifecycle**: Automatic status tracking (RUNNING, COMPLETED, FAILED, CANCELLED)
12
+ - **Organized File Storage**: Prefix-based file organization with unique snowflake IDs
13
+ - **Rich Metadata**: Tags, bindrs, descriptions, and custom metadata support
14
+ - **Simple API**: Minimal configuration, maximum flexibility
15
+
16
+ ## Installation
17
+
18
+ <table>
19
+ <tr>
20
+ <td>Using uv (recommended)</td>
21
+ <td>Using pip</td>
22
+ </tr>
23
+ <tr>
24
+ <td>
25
+
26
+ ```bash
27
+ uv add ml-dash
28
+ ```
29
+
30
+ </td>
31
+ <td>
32
+
33
+ ```bash
34
+ pip install ml-dash
35
+ ```
36
+
37
+ </td>
38
+ </tr>
39
+ </table>
40
+
41
+ ## Getting Started
42
+
43
+ ### Remote Mode (with API Server)
44
+
45
+ ```python
46
+ from ml_dash import Experiment
47
+
48
+ with Experiment(
49
+ name="my-experiment",
50
+ project="my-project",
51
+ remote="https://api.dash.ml",
52
+ api_key="your-jwt-token"
53
+ ) as experiment:
54
+ print(f"Experiment ID: {experiment.id}")
55
+ ```
56
+
57
+ ### Local Mode (Filesystem)
58
+
59
+ ```python
60
+ from ml_dash import Experiment
61
+
62
+ with Experiment(
63
+ name="my-experiment",
64
+ project="my-project",
65
+ local_path=".ml-dash"
66
+ ) as experiment:
67
+ pass # Your code here
68
+ ```
69
+
70
+ See [examples/](examples/) for more complete examples.
71
+
72
+ ## Development Setup
73
+
74
+ ### Installing Dev Dependencies
75
+
76
+ To contribute to ML-Dash or run tests, install the development dependencies:
77
+
78
+ <table>
79
+ <tr>
80
+ <td>Using uv (recommended)</td>
81
+ <td>Using pip</td>
82
+ </tr>
83
+ <tr>
84
+ <td>
85
+
86
+ ```bash
87
+ uv sync --extra dev
88
+ ```
89
+
90
+ </td>
91
+ <td>
92
+
93
+ ```bash
94
+ pip install -e ".[dev]"
95
+ ```
96
+
97
+ </td>
98
+ </tr>
99
+ </table>
100
+
101
+ This installs:
102
+ - `pytest>=8.0.0` - Testing framework
103
+ - `pytest-asyncio>=0.23.0` - Async test support
104
+ - `sphinx>=7.2.0` - Documentation builder
105
+ - `sphinx-rtd-theme>=2.0.0` - Read the Docs theme
106
+ - `sphinx-autobuild>=2024.0.0` - Live preview for documentation
107
+ - `myst-parser>=2.0.0` - Markdown support for Sphinx
108
+ - `ruff>=0.3.0` - Linter and formatter
109
+ - `mypy>=1.9.0` - Type checker
110
+
111
+ ### Running Tests
112
+
113
+ <table>
114
+ <tr>
115
+ <td>Using uv</td>
116
+ <td>Using pytest directly</td>
117
+ </tr>
118
+ <tr>
119
+ <td>
120
+
121
+ ```bash
122
+ uv run pytest
123
+ ```
124
+
125
+ </td>
126
+ <td>
127
+
128
+ ```bash
129
+ pytest
130
+ ```
131
+
132
+ </td>
133
+ </tr>
134
+ </table>
135
+
136
+ ### Building Documentation
137
+
138
+ Documentation is built using Sphinx with Read the Docs theme.
139
+
140
+ <table>
141
+ <tr>
142
+ <td>Build docs</td>
143
+ <td>Live preview</td>
144
+ <td>Clean build</td>
145
+ </tr>
146
+ <tr>
147
+ <td>
148
+
149
+ ```bash
150
+ uv run python -m sphinx -b html docs docs/_build/html
151
+ ```
152
+
153
+ </td>
154
+ <td>
155
+
156
+ ```bash
157
+ uv run sphinx-autobuild docs docs/_build/html
158
+ ```
159
+
160
+ </td>
161
+ <td>
162
+
163
+ ```bash
164
+ rm -rf docs/_build
165
+ ```
166
+
167
+ </td>
168
+ </tr>
169
+ </table>
170
+
171
+ The live preview command starts a local server and automatically rebuilds when files change.
172
+
173
+ Alternatively, you can use the Makefile from within the docs directory:
174
+
175
+ ```bash
176
+ cd docs
177
+ make html # Build HTML documentation
178
+ make clean # Clean build files
179
+ ```
180
+
181
+ For maintainers, to build and publish a new release: `uv build && uv publish`
@@ -0,0 +1,66 @@
1
+ [project]
2
+ name = "ml-dash"
3
+ version = "0.6.1"
4
+ description = "ML experiment tracking and data storage"
5
+ readme = "README.md"
6
+ requires-python = ">=3.9"
7
+ license = {file = "LICENSE"}
8
+ authors = [
9
+ {name = "Ge Yang"},
10
+ {name = "Tom Tao"}
11
+ ]
12
+ keywords = ["machine-learning", "experiment-tracking", "mlops", "data-storage"]
13
+ classifiers = [
14
+ "Development Status :: 4 - Beta",
15
+ "Intended Audience :: Developers",
16
+ "Intended Audience :: Science/Research",
17
+ "License :: OSI Approved :: MIT License",
18
+ "Programming Language :: Python :: 3",
19
+ "Programming Language :: Python :: 3.9",
20
+ "Programming Language :: Python :: 3.10",
21
+ "Programming Language :: Python :: 3.11",
22
+ "Programming Language :: Python :: 3.12",
23
+ "Programming Language :: Python :: 3.13",
24
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
25
+ ]
26
+ dependencies = [
27
+ "httpx>=0.27.0",
28
+ "pyjwt>=2.8.0",
29
+ "imageio>=2.31.0",
30
+ "imageio-ffmpeg>=0.4.9",
31
+ "scikit-image>=0.21.0",
32
+ "rich>=13.0.0",
33
+ "cryptography>=42.0.0",
34
+ ]
35
+
36
+ [project.scripts]
37
+ ml-dash = "ml_dash.cli:main"
38
+
39
+ [project.optional-dependencies]
40
+ auth = [
41
+ "keyring>=25.0.0",
42
+ "qrcode>=8.0.0",
43
+ ]
44
+ dev = [
45
+ "pytest>=8.0.0",
46
+ "pytest-asyncio>=0.23.0",
47
+ "sphinx>=7.2.0",
48
+ "furo>=2024.0.0",
49
+ "sphinx-autodoc-typehints>=2.0.0",
50
+ "sphinx-autobuild>=2024.0.0",
51
+ "sphinx-copybutton>=0.5.0",
52
+ "sphinx-design>=0.5.0",
53
+ "sphinx-tabs>=3.4.0",
54
+ "sphinxcontrib-mermaid>=0.9.0",
55
+ "sphinxext-opengraph>=0.9.0",
56
+ "myst-parser>=2.0.0",
57
+ "linkify-it-py>=2.0.0",
58
+ "ruff>=0.3.0",
59
+ "mypy>=1.9.0",
60
+ ]
61
+
62
+ [tool.uv]
63
+
64
+ [build-system]
65
+ requires = ["uv_build>=0.9.2,<0.10.0"]
66
+ build-backend = "uv_build"
@@ -0,0 +1,85 @@
1
+ """
2
+ ML-Dash Python SDK
3
+
4
+ A simple and flexible SDK for ML experiment metricing and data storage.
5
+
6
+ Usage:
7
+
8
+ # Quickest - dxp (pre-configured remote singleton)
9
+ # Requires: ml-dash login
10
+ from ml_dash import dxp
11
+
12
+ with dxp.run:
13
+ dxp.params.set(lr=0.001)
14
+ dxp.log().info("Training started")
15
+ # Auto-completes on exit from with block
16
+
17
+ # Local mode - explicit configuration
18
+ from ml_dash import Experiment
19
+
20
+ with Experiment(
21
+ name="my-experiment",
22
+ project="my-project",
23
+ local_path=".ml-dash"
24
+ ) as experiment:
25
+ experiment.log("Training started")
26
+ experiment.params.set(lr=0.001)
27
+ experiment.metrics("loss").append(step=0, value=0.5)
28
+
29
+ # Remote mode - explicit configuration
30
+ with Experiment(
31
+ name="my-experiment",
32
+ project="my-project",
33
+ remote="https://api.dash.ml",
34
+ api_key="your-jwt-token"
35
+ ) as experiment:
36
+ experiment.log("Training started")
37
+
38
+ # Decorator style
39
+ from ml_dash import ml_dash_experiment
40
+
41
+ @ml_dash_experiment(
42
+ name="my-experiment",
43
+ project="my-project"
44
+ )
45
+ def train_model(experiment):
46
+ experiment.log("Training started")
47
+ """
48
+
49
+ from .experiment import Experiment, ml_dash_experiment, OperationMode, RunManager
50
+ from .client import RemoteClient
51
+ from .storage import LocalStorage
52
+ from .log import LogLevel, LogBuilder
53
+ from .params import ParametersBuilder
54
+ from .auto_start import dxp
55
+
56
+ __version__ = "0.1.0"
57
+
58
+ __all__ = [
59
+ "Experiment",
60
+ "ml_dash_experiment",
61
+ "OperationMode",
62
+ "RunManager",
63
+ "RemoteClient",
64
+ "LocalStorage",
65
+ "LogLevel",
66
+ "LogBuilder",
67
+ "ParametersBuilder",
68
+ "dxp",
69
+ ]
70
+
71
+ # Hidden for now - rdxp (remote auto-start singleton)
72
+ # Will be exposed in a future release
73
+ #
74
+ # # Lazy-load rdxp to avoid auto-connecting to server on package import
75
+ # _rdxp = None
76
+ #
77
+ # def __getattr__(name):
78
+ # """Lazy-load rdxp only when accessed."""
79
+ # if name == "rdxp":
80
+ # global _rdxp
81
+ # if _rdxp is None:
82
+ # from .remote_auto_start import rdxp as _loaded_rdxp
83
+ # _rdxp = _loaded_rdxp
84
+ # return _rdxp
85
+ # raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
@@ -0,0 +1,51 @@
1
+ """Authentication module for ml-dash."""
2
+
3
+ from .constants import VUER_AUTH_URL, CLIENT_ID, DEFAULT_SCOPE
4
+ from .device_flow import DeviceFlowClient, DeviceFlowResponse
5
+ from .device_secret import (
6
+ generate_device_secret,
7
+ hash_device_secret,
8
+ get_or_create_device_secret,
9
+ )
10
+ from .token_storage import (
11
+ TokenStorage,
12
+ KeyringStorage,
13
+ EncryptedFileStorage,
14
+ PlaintextFileStorage,
15
+ get_token_storage,
16
+ )
17
+ from .exceptions import (
18
+ AuthenticationError,
19
+ NotAuthenticatedError,
20
+ DeviceCodeExpiredError,
21
+ AuthorizationDeniedError,
22
+ TokenExchangeError,
23
+ StorageError,
24
+ )
25
+
26
+ __all__ = [
27
+ # Constants
28
+ "VUER_AUTH_URL",
29
+ "CLIENT_ID",
30
+ "DEFAULT_SCOPE",
31
+ # Device Flow
32
+ "DeviceFlowClient",
33
+ "DeviceFlowResponse",
34
+ # Device Secret
35
+ "generate_device_secret",
36
+ "hash_device_secret",
37
+ "get_or_create_device_secret",
38
+ # Token Storage
39
+ "TokenStorage",
40
+ "KeyringStorage",
41
+ "EncryptedFileStorage",
42
+ "PlaintextFileStorage",
43
+ "get_token_storage",
44
+ # Exceptions
45
+ "AuthenticationError",
46
+ "NotAuthenticatedError",
47
+ "DeviceCodeExpiredError",
48
+ "AuthorizationDeniedError",
49
+ "TokenExchangeError",
50
+ "StorageError",
51
+ ]
@@ -0,0 +1,10 @@
1
+ """Authentication constants for ml-dash."""
2
+
3
+ # Vuer-auth server URL
4
+ VUER_AUTH_URL = "https://auth.vuer.ai"
5
+
6
+ # OAuth client ID for ml-dash
7
+ CLIENT_ID = "ml-dash-client"
8
+
9
+ # Default OAuth scopes (no offline_access since we get permanent tokens)
10
+ DEFAULT_SCOPE = "openid profile email"