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/auto_start.py CHANGED
@@ -9,56 +9,43 @@ Usage:
9
9
  # First, authenticate
10
10
  # $ ml-dash login
11
11
 
12
- from ml_dash.auto_start import dxp
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!", level="info")
16
+ dxp.log().info("Hello from dxp!")
17
17
  dxp.params.set(lr=0.001)
18
- dxp.metrics("train").log(loss=0.5, step=0)
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...", level="info")
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
- prefix=f"{_username}/scratch/{_now:%Y-%m-%d/%H%M%S}",
48
- dash_url="https://api.dash.ml",
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
- """Complete the dxp experiment on exit if still open."""
55
- if dxp._is_open:
56
- try:
57
- dxp.run.complete()
58
- except Exception:
59
- # Silently ignore errors during cleanup
60
- pass
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, profile, api
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()