ml-dash 0.6.2__py3-none-any.whl → 0.6.2rc1__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/__init__.py +64 -36
- ml_dash/auth/token_storage.py +226 -267
- ml_dash/auto_start.py +15 -28
- ml_dash/cli.py +2 -16
- ml_dash/cli_commands/download.py +667 -757
- ml_dash/cli_commands/list.py +13 -146
- ml_dash/cli_commands/login.py +183 -190
- ml_dash/cli_commands/upload.py +1141 -1291
- ml_dash/client.py +6 -79
- ml_dash/config.py +119 -119
- ml_dash/experiment.py +1034 -1234
- ml_dash/files.py +224 -339
- ml_dash/log.py +7 -7
- ml_dash/metric.py +100 -359
- ml_dash/params.py +6 -6
- ml_dash/remote_auto_start.py +17 -20
- ml_dash/run.py +65 -211
- ml_dash/storage.py +1081 -1051
- {ml_dash-0.6.2.dist-info → ml_dash-0.6.2rc1.dist-info}/METADATA +14 -12
- ml_dash-0.6.2rc1.dist-info/RECORD +30 -0
- {ml_dash-0.6.2.dist-info → ml_dash-0.6.2rc1.dist-info}/WHEEL +1 -1
- ml_dash/cli_commands/api.py +0 -165
- ml_dash/cli_commands/profile.py +0 -92
- ml_dash/snowflake.py +0 -173
- ml_dash-0.6.2.dist-info/RECORD +0 -33
- {ml_dash-0.6.2.dist-info → ml_dash-0.6.2rc1.dist-info}/entry_points.txt +0 -0
ml_dash/auto_start.py
CHANGED
|
@@ -9,56 +9,43 @@ Usage:
|
|
|
9
9
|
# First, authenticate
|
|
10
10
|
# $ ml-dash login
|
|
11
11
|
|
|
12
|
-
from ml_dash
|
|
12
|
+
from ml_dash import dxp
|
|
13
13
|
|
|
14
14
|
# Use with statement (recommended)
|
|
15
15
|
with dxp.run:
|
|
16
|
-
dxp.log("Hello from dxp!"
|
|
16
|
+
dxp.log().info("Hello from dxp!")
|
|
17
17
|
dxp.params.set(lr=0.001)
|
|
18
|
-
dxp.metrics("
|
|
18
|
+
dxp.metrics("loss").append(step=0, value=0.5)
|
|
19
19
|
# Automatically completes on exit from with block
|
|
20
20
|
|
|
21
21
|
# Or start/complete manually
|
|
22
22
|
dxp.run.start()
|
|
23
|
-
dxp.log("Training..."
|
|
23
|
+
dxp.log().info("Training...")
|
|
24
24
|
dxp.run.complete()
|
|
25
25
|
"""
|
|
26
26
|
|
|
27
27
|
import atexit
|
|
28
|
+
from .experiment import Experiment
|
|
28
29
|
|
|
29
30
|
# Create pre-configured singleton experiment in remote mode
|
|
30
31
|
# Uses default remote server (https://api.dash.ml)
|
|
31
32
|
# Token is auto-loaded from storage when first used
|
|
32
33
|
# If not authenticated, operations will fail with AuthenticationError
|
|
33
|
-
# Prefix format: {owner}/{project}/path...
|
|
34
|
-
# Using getpass to get current user as owner for local convenience
|
|
35
|
-
import getpass
|
|
36
|
-
from datetime import datetime
|
|
37
|
-
|
|
38
|
-
from .auth.token_storage import get_jwt_user
|
|
39
|
-
from .experiment import Experiment
|
|
40
|
-
|
|
41
|
-
_user = get_jwt_user()
|
|
42
|
-
# Fallback to system username if not authenticated
|
|
43
|
-
_username = _user["username"] if _user else getpass.getuser()
|
|
44
|
-
_now = datetime.now()
|
|
45
|
-
|
|
46
34
|
dxp = Experiment(
|
|
47
|
-
|
|
48
|
-
|
|
35
|
+
name="dxp",
|
|
36
|
+
project="scratch",
|
|
37
|
+
remote="https://api.dash.ml",
|
|
49
38
|
)
|
|
50
39
|
|
|
51
|
-
|
|
52
40
|
# Register cleanup handler to complete experiment on Python exit (if still open)
|
|
53
41
|
def _cleanup():
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
42
|
+
"""Complete the dxp experiment on exit if still open."""
|
|
43
|
+
if dxp._is_open:
|
|
44
|
+
try:
|
|
45
|
+
dxp.run.complete()
|
|
46
|
+
except Exception:
|
|
47
|
+
# Silently ignore errors during cleanup
|
|
48
|
+
pass
|
|
62
49
|
|
|
63
50
|
atexit.register(_cleanup)
|
|
64
51
|
|
ml_dash/cli.py
CHANGED
|
@@ -9,11 +9,7 @@ def create_parser() -> argparse.ArgumentParser:
|
|
|
9
9
|
"""Create the main CLI argument parser."""
|
|
10
10
|
parser = argparse.ArgumentParser(
|
|
11
11
|
prog="ml-dash",
|
|
12
|
-
description=
|
|
13
|
-
"ML-Dash: ML experiment tracking and data storage CLI\n\n"
|
|
14
|
-
"View your experiments, statistics, and plots online at:\n"
|
|
15
|
-
" https://dash.ml\n"
|
|
16
|
-
),
|
|
12
|
+
description="ML-Dash: ML experiment tracking and data storage CLI",
|
|
17
13
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
18
14
|
)
|
|
19
15
|
|
|
@@ -25,15 +21,11 @@ def create_parser() -> argparse.ArgumentParser:
|
|
|
25
21
|
)
|
|
26
22
|
|
|
27
23
|
# Import and add command parsers
|
|
28
|
-
from .cli_commands import upload, download, list as list_cmd, login, logout
|
|
24
|
+
from .cli_commands import upload, download, list as list_cmd, login, logout
|
|
29
25
|
|
|
30
26
|
# Authentication commands
|
|
31
27
|
login.add_parser(subparsers)
|
|
32
28
|
logout.add_parser(subparsers)
|
|
33
|
-
profile.add_parser(subparsers)
|
|
34
|
-
|
|
35
|
-
# API commands
|
|
36
|
-
api.add_parser(subparsers)
|
|
37
29
|
|
|
38
30
|
# Data commands
|
|
39
31
|
upload.add_parser(subparsers)
|
|
@@ -68,9 +60,6 @@ def main(argv: Optional[List[str]] = None) -> int:
|
|
|
68
60
|
elif args.command == "logout":
|
|
69
61
|
from .cli_commands import logout
|
|
70
62
|
return logout.cmd_logout(args)
|
|
71
|
-
elif args.command == "profile":
|
|
72
|
-
from .cli_commands import profile
|
|
73
|
-
return profile.cmd_profile(args)
|
|
74
63
|
elif args.command == "upload":
|
|
75
64
|
from .cli_commands import upload
|
|
76
65
|
return upload.cmd_upload(args)
|
|
@@ -80,9 +69,6 @@ def main(argv: Optional[List[str]] = None) -> int:
|
|
|
80
69
|
elif args.command == "list":
|
|
81
70
|
from .cli_commands import list as list_cmd
|
|
82
71
|
return list_cmd.cmd_list(args)
|
|
83
|
-
elif args.command == "api":
|
|
84
|
-
from .cli_commands import api
|
|
85
|
-
return api.cmd_api(args)
|
|
86
72
|
|
|
87
73
|
# Unknown command (shouldn't happen due to subparsers)
|
|
88
74
|
parser.print_help()
|