ml-dash 0.4.0__tar.gz → 0.5.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.
ml_dash-0.5.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.5.1/PKG-INFO ADDED
@@ -0,0 +1,240 @@
1
+ Metadata-Version: 2.3
2
+ Name: ml-dash
3
+ Version: 0.5.1
4
+ Summary: ML experiment metricing and data storage
5
+ Keywords: machine-learning,experiment-metricing,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: pytest>=8.0.0 ; extra == 'dev'
42
+ Requires-Dist: pytest-asyncio>=0.23.0 ; extra == 'dev'
43
+ Requires-Dist: sphinx>=7.2.0 ; extra == 'dev'
44
+ Requires-Dist: furo>=2024.0.0 ; extra == 'dev'
45
+ Requires-Dist: sphinx-autodoc-typehints>=2.0.0 ; extra == 'dev'
46
+ Requires-Dist: sphinx-autobuild>=2024.0.0 ; extra == 'dev'
47
+ Requires-Dist: sphinx-copybutton>=0.5.0 ; extra == 'dev'
48
+ Requires-Dist: sphinx-design>=0.5.0 ; extra == 'dev'
49
+ Requires-Dist: sphinx-tabs>=3.4.0 ; extra == 'dev'
50
+ Requires-Dist: sphinxcontrib-mermaid>=0.9.0 ; extra == 'dev'
51
+ Requires-Dist: sphinxext-opengraph>=0.9.0 ; extra == 'dev'
52
+ Requires-Dist: myst-parser>=2.0.0 ; extra == 'dev'
53
+ Requires-Dist: linkify-it-py>=2.0.0 ; extra == 'dev'
54
+ Requires-Dist: ruff>=0.3.0 ; extra == 'dev'
55
+ Requires-Dist: mypy>=1.9.0 ; extra == 'dev'
56
+ Requires-Python: >=3.9
57
+ Provides-Extra: dev
58
+ Description-Content-Type: text/markdown
59
+
60
+ # ML-Dash
61
+
62
+ A simple and flexible SDK for ML experiment metricing and data storage.
63
+
64
+ ## Features
65
+
66
+ - **Three Usage Styles**: Decorator, context manager, or direct instantiation
67
+ - **Dual Operation Modes**: Remote (API server) or local (filesystem)
68
+ - **Auto-creation**: Automatically creates namespace, project, and folder hierarchy
69
+ - **Upsert Behavior**: Updates existing experiments or creates new ones
70
+ - **Experiment Lifecycle**: Automatic status tracking (RUNNING, COMPLETED, FAILED, CANCELLED)
71
+ - **Organized File Storage**: Prefix-based file organization with unique snowflake IDs
72
+ - **Rich Metadata**: Tags, bindrs, descriptions, and custom metadata support
73
+ - **Simple API**: Minimal configuration, maximum flexibility
74
+
75
+ ## Installation
76
+
77
+ <table>
78
+ <tr>
79
+ <td>Using uv (recommended)</td>
80
+ <td>Using pip</td>
81
+ </tr>
82
+ <tr>
83
+ <td>
84
+
85
+ ```bash
86
+ uv add ml-dash
87
+ ```
88
+
89
+ </td>
90
+ <td>
91
+
92
+ ```bash
93
+ pip install ml-dash
94
+ ```
95
+
96
+ </td>
97
+ </tr>
98
+ </table>
99
+
100
+ ## Quick Start
101
+
102
+ ### Remote Mode (with API Server)
103
+
104
+ ```python
105
+ from ml_dash import Experiment
106
+
107
+ with Experiment(
108
+ name="my-experiment",
109
+ project="my-project",
110
+ remote="https://cu3thurmv3.us-east-1.awsapprunner.com",
111
+ api_key="your-jwt-token"
112
+ ) as experiment:
113
+ print(f"Experiment ID: {experiment.id}")
114
+ ```
115
+
116
+ ### Local Mode (Filesystem)
117
+
118
+ ```python
119
+ from ml_dash import Experiment
120
+
121
+ with Experiment(
122
+ name="my-experiment",
123
+ project="my-project",
124
+ local_path=".ml-dash"
125
+ ) as experiment:
126
+ pass # Your code here
127
+ ```
128
+
129
+ See [examples/](examples/) for more complete examples.
130
+
131
+ ## Development Setup
132
+
133
+ ### Installing Dev Dependencies
134
+
135
+ To contribute to ML-Dash or run tests, install the development dependencies:
136
+
137
+ <table>
138
+ <tr>
139
+ <td>Using uv (recommended)</td>
140
+ <td>Using pip</td>
141
+ </tr>
142
+ <tr>
143
+ <td>
144
+
145
+ ```bash
146
+ uv sync --extra dev
147
+ ```
148
+
149
+ </td>
150
+ <td>
151
+
152
+ ```bash
153
+ pip install -e ".[dev]"
154
+ ```
155
+
156
+ </td>
157
+ </tr>
158
+ </table>
159
+
160
+ This installs:
161
+ - `pytest>=8.0.0` - Testing framework
162
+ - `pytest-asyncio>=0.23.0` - Async test support
163
+ - `sphinx>=7.2.0` - Documentation builder
164
+ - `sphinx-rtd-theme>=2.0.0` - Read the Docs theme
165
+ - `sphinx-autobuild>=2024.0.0` - Live preview for documentation
166
+ - `myst-parser>=2.0.0` - Markdown support for Sphinx
167
+ - `ruff>=0.3.0` - Linter and formatter
168
+ - `mypy>=1.9.0` - Type checker
169
+
170
+ ### Running Tests
171
+
172
+ <table>
173
+ <tr>
174
+ <td>Using uv</td>
175
+ <td>Using pytest directly</td>
176
+ </tr>
177
+ <tr>
178
+ <td>
179
+
180
+ ```bash
181
+ uv run pytest
182
+ ```
183
+
184
+ </td>
185
+ <td>
186
+
187
+ ```bash
188
+ pytest
189
+ ```
190
+
191
+ </td>
192
+ </tr>
193
+ </table>
194
+
195
+ ### Building Documentation
196
+
197
+ Documentation is built using Sphinx with Read the Docs theme.
198
+
199
+ <table>
200
+ <tr>
201
+ <td>Build docs</td>
202
+ <td>Live preview</td>
203
+ <td>Clean build</td>
204
+ </tr>
205
+ <tr>
206
+ <td>
207
+
208
+ ```bash
209
+ uv run python -m sphinx -b html docs docs/_build/html
210
+ ```
211
+
212
+ </td>
213
+ <td>
214
+
215
+ ```bash
216
+ uv run sphinx-autobuild docs docs/_build/html
217
+ ```
218
+
219
+ </td>
220
+ <td>
221
+
222
+ ```bash
223
+ rm -rf docs/_build
224
+ ```
225
+
226
+ </td>
227
+ </tr>
228
+ </table>
229
+
230
+ The live preview command starts a local server and automatically rebuilds when files change.
231
+
232
+ Alternatively, you can use the Makefile from within the docs directory:
233
+
234
+ ```bash
235
+ cd docs
236
+ make html # Build HTML documentation
237
+ make clean # Clean build files
238
+ ```
239
+
240
+ 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
+ ## Quick Start
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://cu3thurmv3.us-east-1.awsapprunner.com",
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,54 @@
1
+ [project]
2
+ name = "ml-dash"
3
+ version = "0.5.1"
4
+ description = "ML experiment metricing 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-metricing", "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
+ ]
30
+
31
+ [project.optional-dependencies]
32
+ dev = [
33
+ "pytest>=8.0.0",
34
+ "pytest-asyncio>=0.23.0",
35
+ "sphinx>=7.2.0",
36
+ "furo>=2024.0.0",
37
+ "sphinx-autodoc-typehints>=2.0.0",
38
+ "sphinx-autobuild>=2024.0.0",
39
+ "sphinx-copybutton>=0.5.0",
40
+ "sphinx-design>=0.5.0",
41
+ "sphinx-tabs>=3.4.0",
42
+ "sphinxcontrib-mermaid>=0.9.0",
43
+ "sphinxext-opengraph>=0.9.0",
44
+ "myst-parser>=2.0.0",
45
+ "linkify-it-py>=2.0.0",
46
+ "ruff>=0.3.0",
47
+ "mypy>=1.9.0",
48
+ ]
49
+
50
+ [tool.uv]
51
+
52
+ [build-system]
53
+ requires = ["uv_build>=0.9.2,<0.10.0"]
54
+ build-backend = "uv_build"
@@ -0,0 +1,58 @@
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
+ # Remote mode (API server)
9
+ from ml_dash import Experiment
10
+
11
+ with Experiment(
12
+ name="my-experiment",
13
+ project="my-project",
14
+ remote="http://localhost:3000",
15
+ api_key="your-jwt-token"
16
+ ) as experiment:
17
+ experiment.log("Training started")
18
+ experiment.metric("loss", {"step": 0, "value": 0.5})
19
+
20
+ # Local mode (filesystem)
21
+ with Experiment(
22
+ name="my-experiment",
23
+ project="my-project",
24
+ local_path=".ml-dash"
25
+ ) as experiment:
26
+ experiment.log("Training started")
27
+
28
+ # Decorator style
29
+ from ml_dash import ml_dash_experiment
30
+
31
+ @ml_dash_experiment(
32
+ name="my-experiment",
33
+ project="my-project",
34
+ remote="http://localhost:3000",
35
+ api_key="your-jwt-token"
36
+ )
37
+ def train_model(experiment):
38
+ experiment.log("Training started")
39
+ """
40
+
41
+ from .experiment import Experiment, ml_dash_experiment, OperationMode
42
+ from .client import RemoteClient
43
+ from .storage import LocalStorage
44
+ from .log import LogLevel, LogBuilder
45
+ from .params import ParametersBuilder
46
+
47
+ __version__ = "0.1.0"
48
+
49
+ __all__ = [
50
+ "Experiment",
51
+ "ml_dash_experiment",
52
+ "OperationMode",
53
+ "RemoteClient",
54
+ "LocalStorage",
55
+ "LogLevel",
56
+ "LogBuilder",
57
+ "ParametersBuilder",
58
+ ]