ml-dash 0.5.4__py3-none-any.whl → 0.5.5__py3-none-any.whl
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/experiment.py
CHANGED
|
@@ -460,7 +460,7 @@ class Experiment:
|
|
|
460
460
|
timestamp=log_entry["timestamp"]
|
|
461
461
|
)
|
|
462
462
|
|
|
463
|
-
def
|
|
463
|
+
def files(self, **kwargs) -> FileBuilder:
|
|
464
464
|
"""
|
|
465
465
|
Get a FileBuilder for fluent file operations.
|
|
466
466
|
|
|
@@ -472,17 +472,17 @@ class Experiment:
|
|
|
472
472
|
|
|
473
473
|
Examples:
|
|
474
474
|
# Upload file
|
|
475
|
-
experiment.
|
|
475
|
+
experiment.files(file_path="./model.pt", prefix="/models").save()
|
|
476
476
|
|
|
477
477
|
# List files
|
|
478
|
-
files = experiment.
|
|
479
|
-
files = experiment.
|
|
478
|
+
files = experiment.files().list()
|
|
479
|
+
files = experiment.files(prefix="/models").list()
|
|
480
480
|
|
|
481
481
|
# Download file
|
|
482
|
-
experiment.
|
|
482
|
+
experiment.files(file_id="123").download()
|
|
483
483
|
|
|
484
484
|
# Delete file
|
|
485
|
-
experiment.
|
|
485
|
+
experiment.files(file_id="123").delete()
|
|
486
486
|
"""
|
|
487
487
|
if not self._is_open:
|
|
488
488
|
raise RuntimeError("Experiment not open. Use experiment.open() or context manager.")
|
ml_dash/files.py
CHANGED
|
@@ -19,18 +19,18 @@ class FileBuilder:
|
|
|
19
19
|
|
|
20
20
|
Usage:
|
|
21
21
|
# Upload file
|
|
22
|
-
experiment.
|
|
22
|
+
experiment.files(file_path="./model.pt", prefix="/models").save()
|
|
23
23
|
|
|
24
24
|
# List files
|
|
25
|
-
files = experiment.
|
|
26
|
-
files = experiment.
|
|
25
|
+
files = experiment.files().list()
|
|
26
|
+
files = experiment.files(prefix="/models").list()
|
|
27
27
|
|
|
28
28
|
# Download file
|
|
29
|
-
experiment.
|
|
30
|
-
experiment.
|
|
29
|
+
experiment.files(file_id="123").download()
|
|
30
|
+
experiment.files(file_id="123", dest_path="./model.pt").download()
|
|
31
31
|
|
|
32
32
|
# Delete file
|
|
33
|
-
experiment.
|
|
33
|
+
experiment.files(file_id="123").delete()
|
|
34
34
|
"""
|
|
35
35
|
|
|
36
36
|
def __init__(self, experiment: 'Experiment', **kwargs):
|
|
@@ -72,7 +72,7 @@ class FileBuilder:
|
|
|
72
72
|
ValueError: If file size exceeds 5GB limit
|
|
73
73
|
|
|
74
74
|
Examples:
|
|
75
|
-
result = experiment.
|
|
75
|
+
result = experiment.files(file_path="./model.pt", prefix="/models").save()
|
|
76
76
|
# Returns: {"id": "123", "path": "/models", "filename": "model.pt", ...}
|
|
77
77
|
"""
|
|
78
78
|
if not self._experiment._is_open:
|
|
@@ -130,9 +130,9 @@ class FileBuilder:
|
|
|
130
130
|
RuntimeError: If experiment is not open
|
|
131
131
|
|
|
132
132
|
Examples:
|
|
133
|
-
files = experiment.
|
|
134
|
-
files = experiment.
|
|
135
|
-
files = experiment.
|
|
133
|
+
files = experiment.files().list() # All files
|
|
134
|
+
files = experiment.files(prefix="/models").list() # Filter by prefix
|
|
135
|
+
files = experiment.files(tags=["checkpoint"]).list() # Filter by tags
|
|
136
136
|
"""
|
|
137
137
|
if not self._experiment._is_open:
|
|
138
138
|
raise RuntimeError("Experiment not open. Use experiment.open() or context manager.")
|
|
@@ -158,10 +158,10 @@ class FileBuilder:
|
|
|
158
158
|
|
|
159
159
|
Examples:
|
|
160
160
|
# Download to current directory with original filename
|
|
161
|
-
path = experiment.
|
|
161
|
+
path = experiment.files(file_id="123").download()
|
|
162
162
|
|
|
163
163
|
# Download to custom path
|
|
164
|
-
path = experiment.
|
|
164
|
+
path = experiment.files(file_id="123", dest_path="./model.pt").download()
|
|
165
165
|
"""
|
|
166
166
|
if not self._experiment._is_open:
|
|
167
167
|
raise RuntimeError("Experiment not open. Use experiment.open() or context manager.")
|
|
@@ -186,7 +186,7 @@ class FileBuilder:
|
|
|
186
186
|
ValueError: If file_id not provided
|
|
187
187
|
|
|
188
188
|
Examples:
|
|
189
|
-
result = experiment.
|
|
189
|
+
result = experiment.files(file_id="123").delete()
|
|
190
190
|
"""
|
|
191
191
|
if not self._experiment._is_open:
|
|
192
192
|
raise RuntimeError("Experiment not open. Use experiment.open() or context manager.")
|
|
@@ -211,7 +211,7 @@ class FileBuilder:
|
|
|
211
211
|
ValueError: If file_id not provided
|
|
212
212
|
|
|
213
213
|
Examples:
|
|
214
|
-
result = experiment.
|
|
214
|
+
result = experiment.files(
|
|
215
215
|
file_id="123",
|
|
216
216
|
description="Updated description",
|
|
217
217
|
tags=["new", "tags"],
|
|
@@ -251,7 +251,7 @@ class FileBuilder:
|
|
|
251
251
|
|
|
252
252
|
Examples:
|
|
253
253
|
config = {"model": "resnet50", "lr": 0.001}
|
|
254
|
-
result = experiment.
|
|
254
|
+
result = experiment.files(prefix="/configs").save_json(config, "config.json")
|
|
255
255
|
"""
|
|
256
256
|
import json
|
|
257
257
|
import tempfile
|
|
@@ -309,10 +309,10 @@ class FileBuilder:
|
|
|
309
309
|
Examples:
|
|
310
310
|
import torch
|
|
311
311
|
model = torch.nn.Linear(10, 5)
|
|
312
|
-
result = experiment.
|
|
312
|
+
result = experiment.files(prefix="/models").save_torch(model, "model.pt")
|
|
313
313
|
|
|
314
314
|
# Or save state dict
|
|
315
|
-
result = experiment.
|
|
315
|
+
result = experiment.files(prefix="/models").save_torch(model.state_dict(), "model.pth")
|
|
316
316
|
"""
|
|
317
317
|
import tempfile
|
|
318
318
|
import os
|
|
@@ -372,10 +372,10 @@ class FileBuilder:
|
|
|
372
372
|
|
|
373
373
|
Examples:
|
|
374
374
|
data = {"model": "resnet50", "weights": np.array([1, 2, 3])}
|
|
375
|
-
result = experiment.
|
|
375
|
+
result = experiment.files(prefix="/data").save_pkl(data, "data.pkl")
|
|
376
376
|
|
|
377
377
|
# Or save any Python object
|
|
378
|
-
result = experiment.
|
|
378
|
+
result = experiment.files(prefix="/models").save_pkl(trained_model, "model.pickle")
|
|
379
379
|
"""
|
|
380
380
|
import pickle
|
|
381
381
|
import tempfile
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
ml_dash/__init__.py,sha256=o_LrWVJBY_VkUGhSBs5wdb_NqEsHD1AK9HGsjZGxHxQ,1414
|
|
2
2
|
ml_dash/auto_start.py,sha256=c3XcXFpZdvjtWauEoK5043Gw9k0L_5IDq4fdiB2ha88,959
|
|
3
3
|
ml_dash/client.py,sha256=vhWcS5o2n3o4apEjVeLmu7flCEzxBbBOoLSQNcAx_ew,17267
|
|
4
|
-
ml_dash/experiment.py,sha256=
|
|
5
|
-
ml_dash/files.py,sha256=
|
|
4
|
+
ml_dash/experiment.py,sha256=K36HkHJb_O2-vdaPPOCq74_2nZtfiLaS0o7qhTntD8Q,30646
|
|
5
|
+
ml_dash/files.py,sha256=mCaKoeeog9GqiTTt5hedQCHSp0YfxMFON4c2EuKTbmw,15843
|
|
6
6
|
ml_dash/log.py,sha256=0yXaNnFwYeBI3tRLHX3kkqWRpg0MbSGwmgjnOfsElCk,5350
|
|
7
7
|
ml_dash/metric.py,sha256=c0Zl0wEufmQuVfwIMvrORLwqe92Iaf0PfKRgmlgQWzQ,10343
|
|
8
8
|
ml_dash/params.py,sha256=xaByDSVar4D1pZqxTANkMPeZTL5-V7ewJe5TXfPLhMQ,5980
|
|
9
9
|
ml_dash/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
ml_dash/storage.py,sha256=8lyT5ZdvhS2nEyrEgMnFAT0LzV5ne1v8tkI3w1PUHJ4,30793
|
|
11
|
-
ml_dash-0.5.
|
|
12
|
-
ml_dash-0.5.
|
|
13
|
-
ml_dash-0.5.
|
|
11
|
+
ml_dash-0.5.5.dist-info/WHEEL,sha256=X16MKk8bp2DRsAuyteHJ-9qOjzmnY0x1aj0P1ftqqWA,78
|
|
12
|
+
ml_dash-0.5.5.dist-info/METADATA,sha256=PHpldRX1K1duM-o5S5uu5dAE2h0ECplMLw_wDc-9t3I,6043
|
|
13
|
+
ml_dash-0.5.5.dist-info/RECORD,,
|
|
File without changes
|