lyceum-cli 1.0.32__py3-none-any.whl → 1.0.33__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.
- lyceum/external/compute/execution/gpu_selection.py +1 -17
- lyceum/external/compute/execution/python.py +9 -2
- {lyceum_cli-1.0.32.dist-info → lyceum_cli-1.0.33.dist-info}/METADATA +1 -1
- {lyceum_cli-1.0.32.dist-info → lyceum_cli-1.0.33.dist-info}/RECORD +7 -7
- {lyceum_cli-1.0.32.dist-info → lyceum_cli-1.0.33.dist-info}/WHEEL +1 -1
- {lyceum_cli-1.0.32.dist-info → lyceum_cli-1.0.33.dist-info}/entry_points.txt +0 -0
- {lyceum_cli-1.0.32.dist-info → lyceum_cli-1.0.33.dist-info}/top_level.txt +0 -0
|
@@ -689,14 +689,6 @@ def predict_memory(
|
|
|
689
689
|
imports: list[str] | None = typer.Option(
|
|
690
690
|
None, "--import", help="Pre-import modules (can be used multiple times)"
|
|
691
691
|
),
|
|
692
|
-
mixed_precision: str | None = typer.Option(
|
|
693
|
-
None, "--mixed-precision", "-mp",
|
|
694
|
-
help="Mixed precision dtype (fp16, bf16)"
|
|
695
|
-
),
|
|
696
|
-
strategy: str | None = typer.Option(
|
|
697
|
-
None, "--strategy", "-s",
|
|
698
|
-
help="Parallelization strategy (ddp, fsdp, zero1, zero2, zero3)"
|
|
699
|
-
),
|
|
700
692
|
use_config: bool = typer.Option(
|
|
701
693
|
True, "--use-config/--no-config",
|
|
702
694
|
help="Use workspace config from .lyceum/config.json if available"
|
|
@@ -708,9 +700,7 @@ def predict_memory(
|
|
|
708
700
|
full GPU profiling. Faster than 'predict run'.
|
|
709
701
|
|
|
710
702
|
Examples:
|
|
711
|
-
lyceum
|
|
712
|
-
lyceum predict memory train.py --mixed-precision fp16
|
|
713
|
-
lyceum predict memory train.py --strategy fsdp
|
|
703
|
+
lyceum gpu-selection memory train.py
|
|
714
704
|
"""
|
|
715
705
|
status = StatusLine()
|
|
716
706
|
|
|
@@ -749,12 +739,6 @@ def predict_memory(
|
|
|
749
739
|
if import_files:
|
|
750
740
|
payload["import_files"] = import_files
|
|
751
741
|
|
|
752
|
-
# TODO: When backend supports it, add mixed_precision and strategy to payload
|
|
753
|
-
if mixed_precision:
|
|
754
|
-
console.print(f"[dim]Note: --mixed-precision {mixed_precision} (backend support coming soon)[/dim]")
|
|
755
|
-
if strategy:
|
|
756
|
-
console.print(f"[dim]Note: --strategy {strategy} (backend support coming soon)[/dim]")
|
|
757
|
-
|
|
758
742
|
execution_id = submit_gpu_selection(payload, status)
|
|
759
743
|
console.print(f"[dim]Execution ID: {execution_id}[/dim]")
|
|
760
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
|
|
|
@@ -8,9 +8,9 @@ lyceum/external/compute/execution/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZ
|
|
|
8
8
|
lyceum/external/compute/execution/config.py,sha256=6JJgLJnDPTwevEaNdB1nEICih_qbBmws5u5_S9gj7k0,8866
|
|
9
9
|
lyceum/external/compute/execution/docker.py,sha256=0Y6lxJAm56Jrl0HxeNz1mX6DGs556i2iMN9_U1JQP0c,9635
|
|
10
10
|
lyceum/external/compute/execution/docker_compose.py,sha256=YsWPnw5nB1ZpqjU9X8o_klT78I5m46PapVwVEeWra_8,9189
|
|
11
|
-
lyceum/external/compute/execution/gpu_selection.py,sha256=
|
|
11
|
+
lyceum/external/compute/execution/gpu_selection.py,sha256=LX3Ar4srw6s8PcKxASnzVOrLH6tmU1vl7rHSAkrsoEE,38900
|
|
12
12
|
lyceum/external/compute/execution/notebook.py,sha256=Gw9UhJ-UjYhpjdIYQ4IMYhVjhSkAFpOQ9aFYj1qOeww,7542
|
|
13
|
-
lyceum/external/compute/execution/python.py,sha256
|
|
13
|
+
lyceum/external/compute/execution/python.py,sha256=-7GVRpQlQwn5Je_7B-LZAagEZ5mE5V4Ijs2wRThd43Q,13193
|
|
14
14
|
lyceum/external/compute/execution/workloads.py,sha256=4fsRWbYGmsQMGPPIN1jUG8cG5NPG9yV26ANJ-DtaXqc,5844
|
|
15
15
|
lyceum/external/compute/inference/__init__.py,sha256=4YLoUKDEzitexynJv_Q5O0w1lty8CJ6uyRxuc1LiaBw,89
|
|
16
16
|
lyceum/external/compute/inference/batch.py,sha256=F4MlR2IEi1X7qUo3UDUVRWclHLLmmjqu7KZ3RkHIjNM,4349
|
|
@@ -29,8 +29,8 @@ lyceum/shared/streaming.py,sha256=wFb7w7fra63y8WWaIA8_E1Z6Sx_6G-0J53Zh010eZgk,93
|
|
|
29
29
|
lyceum_cloud_execution_api_client/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
30
30
|
lyceum_cloud_execution_api_client/api/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
31
31
|
lyceum_cloud_execution_api_client/models/__init__.py,sha256=AMlb9R9O9aNC9hvKz_8TFpEfOolYC3VtFS5JX17kYks,4888
|
|
32
|
-
lyceum_cli-1.0.
|
|
33
|
-
lyceum_cli-1.0.
|
|
34
|
-
lyceum_cli-1.0.
|
|
35
|
-
lyceum_cli-1.0.
|
|
36
|
-
lyceum_cli-1.0.
|
|
32
|
+
lyceum_cli-1.0.33.dist-info/METADATA,sha256=N3bGDPySJO1veoawv0LpK7mMETe1cWr6mHPruUcha-8,1482
|
|
33
|
+
lyceum_cli-1.0.33.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
34
|
+
lyceum_cli-1.0.33.dist-info/entry_points.txt,sha256=Oq-9wDkxVd6MHgNiUTYwXI9SGhvR3VkD7Mvk0xhiUZo,43
|
|
35
|
+
lyceum_cli-1.0.33.dist-info/top_level.txt,sha256=CR7FEMloAXgLsHUR6ti3mWNcpgje27HRHSfq8doIils,41
|
|
36
|
+
lyceum_cli-1.0.33.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|