lyceum-cli 1.0.31__tar.gz → 1.0.33__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.
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/PKG-INFO +1 -1
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum/external/compute/execution/gpu_selection.py +20 -17
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum/external/compute/execution/python.py +9 -2
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum/shared/config.py +1 -1
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum_cli.egg-info/PKG-INFO +1 -1
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/setup.py +1 -1
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum/__init__.py +0 -0
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum/external/__init__.py +0 -0
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum/external/auth/__init__.py +0 -0
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum/external/auth/login.py +0 -0
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum/external/compute/__init__.py +0 -0
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum/external/compute/execution/__init__.py +0 -0
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum/external/compute/execution/config.py +0 -0
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum/external/compute/execution/docker.py +0 -0
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum/external/compute/execution/docker_compose.py +0 -0
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum/external/compute/execution/notebook.py +0 -0
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum/external/compute/execution/workloads.py +0 -0
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum/external/compute/inference/__init__.py +0 -0
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum/external/compute/inference/batch.py +0 -0
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum/external/compute/inference/chat.py +0 -0
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum/external/compute/inference/infer.py +0 -0
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum/external/compute/inference/models.py +0 -0
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum/external/general/__init__.py +0 -0
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum/external/vms/__init__.py +0 -0
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum/external/vms/instances.py +0 -0
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum/external/vms/management.py +0 -0
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum/main.py +0 -0
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum/shared/__init__.py +0 -0
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum/shared/display.py +0 -0
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum/shared/imports.py +0 -0
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum/shared/streaming.py +0 -0
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum_cli.egg-info/SOURCES.txt +0 -0
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum_cli.egg-info/dependency_links.txt +0 -0
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum_cli.egg-info/entry_points.txt +0 -0
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum_cli.egg-info/requires.txt +0 -0
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum_cli.egg-info/top_level.txt +0 -0
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum_cloud_execution_api_client/__init__.py +0 -0
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum_cloud_execution_api_client/api/__init__.py +0 -0
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum_cloud_execution_api_client/models/__init__.py +0 -0
- {lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/setup.cfg +0 -0
|
@@ -59,6 +59,22 @@ GPU_VRAM_GB = {
|
|
|
59
59
|
"gpu.rtx6000pro": 48,
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
+
# Fallback pricing per hour (used when API doesn't return prices)
|
|
63
|
+
GPU_PRICE_PER_HOUR = {
|
|
64
|
+
"cpu": 0.20,
|
|
65
|
+
"gpu": 0.39,
|
|
66
|
+
"gpu.t4": 0.39,
|
|
67
|
+
"gpu.t4.64gb": 1.50,
|
|
68
|
+
"gpu.a100": 2.00,
|
|
69
|
+
"gpu.a100.40gb": 1.95,
|
|
70
|
+
"gpu.a100.80gb": 1.99,
|
|
71
|
+
"gpu.h100": 3.29,
|
|
72
|
+
"gpu.h200": 3.69,
|
|
73
|
+
"gpu.l40s": 1.49,
|
|
74
|
+
"gpu.b200": 5.69,
|
|
75
|
+
"gpu.rtx6000pro": 1.95,
|
|
76
|
+
}
|
|
77
|
+
|
|
62
78
|
|
|
63
79
|
def format_gpu_name(profile: str) -> str:
|
|
64
80
|
"""Format GPU profile name for display."""
|
|
@@ -95,6 +111,9 @@ def fetch_gpu_pricing() -> dict[str, float]:
|
|
|
95
111
|
def calculate_cost(execution_time_s: float, hardware_profile: str, pricing: dict[str, float]) -> float | None:
|
|
96
112
|
"""Calculate cost based on execution time and GPU pricing."""
|
|
97
113
|
price_per_hour = pricing.get(hardware_profile)
|
|
114
|
+
# Fallback to hardcoded pricing if API doesn't have this profile
|
|
115
|
+
if price_per_hour is None or price_per_hour == 0:
|
|
116
|
+
price_per_hour = GPU_PRICE_PER_HOUR.get(hardware_profile)
|
|
98
117
|
if price_per_hour is None or price_per_hour == 0:
|
|
99
118
|
return None
|
|
100
119
|
return execution_time_s * (price_per_hour / 3600)
|
|
@@ -670,14 +689,6 @@ def predict_memory(
|
|
|
670
689
|
imports: list[str] | None = typer.Option(
|
|
671
690
|
None, "--import", help="Pre-import modules (can be used multiple times)"
|
|
672
691
|
),
|
|
673
|
-
mixed_precision: str | None = typer.Option(
|
|
674
|
-
None, "--mixed-precision", "-mp",
|
|
675
|
-
help="Mixed precision dtype (fp16, bf16)"
|
|
676
|
-
),
|
|
677
|
-
strategy: str | None = typer.Option(
|
|
678
|
-
None, "--strategy", "-s",
|
|
679
|
-
help="Parallelization strategy (ddp, fsdp, zero1, zero2, zero3)"
|
|
680
|
-
),
|
|
681
692
|
use_config: bool = typer.Option(
|
|
682
693
|
True, "--use-config/--no-config",
|
|
683
694
|
help="Use workspace config from .lyceum/config.json if available"
|
|
@@ -689,9 +700,7 @@ def predict_memory(
|
|
|
689
700
|
full GPU profiling. Faster than 'predict run'.
|
|
690
701
|
|
|
691
702
|
Examples:
|
|
692
|
-
lyceum
|
|
693
|
-
lyceum predict memory train.py --mixed-precision fp16
|
|
694
|
-
lyceum predict memory train.py --strategy fsdp
|
|
703
|
+
lyceum gpu-selection memory train.py
|
|
695
704
|
"""
|
|
696
705
|
status = StatusLine()
|
|
697
706
|
|
|
@@ -730,12 +739,6 @@ def predict_memory(
|
|
|
730
739
|
if import_files:
|
|
731
740
|
payload["import_files"] = import_files
|
|
732
741
|
|
|
733
|
-
# TODO: When backend supports it, add mixed_precision and strategy to payload
|
|
734
|
-
if mixed_precision:
|
|
735
|
-
console.print(f"[dim]Note: --mixed-precision {mixed_precision} (backend support coming soon)[/dim]")
|
|
736
|
-
if strategy:
|
|
737
|
-
console.print(f"[dim]Note: --strategy {strategy} (backend support coming soon)[/dim]")
|
|
738
|
-
|
|
739
742
|
execution_id = submit_gpu_selection(payload, status)
|
|
740
743
|
console.print(f"[dim]Execution ID: {execution_id}[/dim]")
|
|
741
744
|
|
|
@@ -73,15 +73,22 @@ def load_workspace_config(file_path: Path | None = None) -> dict | None:
|
|
|
73
73
|
|
|
74
74
|
def read_code_from_source(code_or_file: str, status: StatusLine = None) -> tuple[str, Path | None, str | None]:
|
|
75
75
|
"""Read code from file or return as-is if it's inline code."""
|
|
76
|
-
|
|
76
|
+
# Check if input looks like a file path
|
|
77
|
+
looks_like_file = code_or_file.endswith((".py", ".ipynb")) or "/" in code_or_file or "\\" in code_or_file
|
|
77
78
|
|
|
78
|
-
|
|
79
|
+
file_path = Path(code_or_file)
|
|
80
|
+
if file_path.exists():
|
|
79
81
|
if status:
|
|
80
82
|
status.update(f"Reading {file_path.name}...")
|
|
81
83
|
with open(file_path) as f:
|
|
82
84
|
code_content = f.read()
|
|
83
85
|
return code_content, file_path, file_path.name
|
|
84
86
|
|
|
87
|
+
# If it looks like a file but doesn't exist, raise an error
|
|
88
|
+
if looks_like_file:
|
|
89
|
+
raise FileNotFoundError(f"File not found: {code_or_file}")
|
|
90
|
+
|
|
91
|
+
# Otherwise treat as inline code
|
|
85
92
|
return code_or_file, None, None
|
|
86
93
|
|
|
87
94
|
|
|
@@ -129,7 +129,7 @@ class _Config:
|
|
|
129
129
|
if self.is_token_expired():
|
|
130
130
|
console.print("[dim]Token expired, attempting refresh...[/dim]")
|
|
131
131
|
if not self.refresh_access_token():
|
|
132
|
-
console.print("[red]Token refresh failed. Please run 'lyceum login' again.[/red]")
|
|
132
|
+
console.print("[red]Token refresh failed. Please run 'lyceum auth login' again.[/red]")
|
|
133
133
|
raise typer.Exit(1)
|
|
134
134
|
|
|
135
135
|
# Return config instance - commands use httpx directly
|
|
@@ -13,7 +13,7 @@ if readme_file.exists():
|
|
|
13
13
|
|
|
14
14
|
setup(
|
|
15
15
|
name="lyceum-cli",
|
|
16
|
-
version="1.0.
|
|
16
|
+
version="1.0.33",
|
|
17
17
|
description="Command-line interface for Lyceum Cloud Execution API",
|
|
18
18
|
long_description=long_description,
|
|
19
19
|
long_description_content_type="text/markdown",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lyceum_cli-1.0.31 → lyceum_cli-1.0.33}/lyceum_cloud_execution_api_client/models/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|