podstack 1.3.13__tar.gz → 1.3.14__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.
- {podstack-1.3.13 → podstack-1.3.14}/PKG-INFO +161 -8
- {podstack-1.3.13 → podstack-1.3.14}/README.md +160 -7
- {podstack-1.3.13 → podstack-1.3.14}/podstack/registry/client.py +482 -4
- {podstack-1.3.13 → podstack-1.3.14}/podstack/registry/experiment.py +90 -1
- {podstack-1.3.13 → podstack-1.3.14}/podstack.egg-info/PKG-INFO +161 -8
- {podstack-1.3.13 → podstack-1.3.14}/pyproject.toml +1 -1
- {podstack-1.3.13 → podstack-1.3.14}/LICENSE +0 -0
- {podstack-1.3.13 → podstack-1.3.14}/podstack/__init__.py +0 -0
- {podstack-1.3.13 → podstack-1.3.14}/podstack/annotations.py +0 -0
- {podstack-1.3.13 → podstack-1.3.14}/podstack/client.py +0 -0
- {podstack-1.3.13 → podstack-1.3.14}/podstack/exceptions.py +0 -0
- {podstack-1.3.13 → podstack-1.3.14}/podstack/execution.py +0 -0
- {podstack-1.3.13 → podstack-1.3.14}/podstack/gpu_runner.py +0 -0
- {podstack-1.3.13 → podstack-1.3.14}/podstack/models.py +0 -0
- {podstack-1.3.13 → podstack-1.3.14}/podstack/notebook.py +0 -0
- {podstack-1.3.13 → podstack-1.3.14}/podstack/registry/__init__.py +0 -0
- {podstack-1.3.13 → podstack-1.3.14}/podstack/registry/autolog.py +0 -0
- {podstack-1.3.13 → podstack-1.3.14}/podstack/registry/exceptions.py +0 -0
- {podstack-1.3.13 → podstack-1.3.14}/podstack/registry/model.py +0 -0
- {podstack-1.3.13 → podstack-1.3.14}/podstack/registry/model_utils.py +0 -0
- {podstack-1.3.13 → podstack-1.3.14}/podstack.egg-info/SOURCES.txt +0 -0
- {podstack-1.3.13 → podstack-1.3.14}/podstack.egg-info/dependency_links.txt +0 -0
- {podstack-1.3.13 → podstack-1.3.14}/podstack.egg-info/requires.txt +0 -0
- {podstack-1.3.13 → podstack-1.3.14}/podstack.egg-info/top_level.txt +0 -0
- {podstack-1.3.13 → podstack-1.3.14}/podstack_gpu/__init__.py +0 -0
- {podstack-1.3.13 → podstack-1.3.14}/podstack_gpu/app.py +0 -0
- {podstack-1.3.13 → podstack-1.3.14}/podstack_gpu/exceptions.py +0 -0
- {podstack-1.3.13 → podstack-1.3.14}/podstack_gpu/image.py +0 -0
- {podstack-1.3.13 → podstack-1.3.14}/podstack_gpu/runner.py +0 -0
- {podstack-1.3.13 → podstack-1.3.14}/podstack_gpu/secret.py +0 -0
- {podstack-1.3.13 → podstack-1.3.14}/podstack_gpu/utils.py +0 -0
- {podstack-1.3.13 → podstack-1.3.14}/podstack_gpu/volume.py +0 -0
- {podstack-1.3.13 → podstack-1.3.14}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: podstack
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.14
|
|
4
4
|
Summary: Official Python SDK for Podstack GPU Notebook Platform
|
|
5
5
|
Author-email: Podstack <support@podstack.ai>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -298,9 +298,9 @@ with registry.start_run(name="training-v1") as run:
|
|
|
298
298
|
# Set tags
|
|
299
299
|
registry.set_tag("framework", "pytorch")
|
|
300
300
|
|
|
301
|
-
#
|
|
302
|
-
registry.log_artifact("model.pt"
|
|
303
|
-
registry.log_artifact("training_curves.png", "plots")
|
|
301
|
+
# Upload artifacts to cloud artifact store
|
|
302
|
+
registry.log_artifact("model.pt")
|
|
303
|
+
registry.log_artifact("training_curves.png", artifact_path="plots/curves.png")
|
|
304
304
|
|
|
305
305
|
# Log dataset provenance (first-class resource, deduped by content hash)
|
|
306
306
|
registry.log_dataset("imdb-reviews", path="data/imdb.csv", context="training")
|
|
@@ -316,7 +316,7 @@ with registry.start_run(name="training-v1") as run:
|
|
|
316
316
|
```python
|
|
317
317
|
from podstack import registry
|
|
318
318
|
|
|
319
|
-
#
|
|
319
|
+
# Serialize and upload the model to the artifact store (auto-detects framework)
|
|
320
320
|
registry.log_model(model, artifact_path="model", framework="pytorch")
|
|
321
321
|
|
|
322
322
|
# Register in model registry
|
|
@@ -332,7 +332,7 @@ registry.set_model_stage("my-classifier", version=1, stage="production")
|
|
|
332
332
|
# Set aliases
|
|
333
333
|
registry.set_model_alias("my-classifier", alias="champion", version=1)
|
|
334
334
|
|
|
335
|
-
# Load model from
|
|
335
|
+
# Load model from any machine — files are downloaded automatically if missing locally
|
|
336
336
|
model = registry.load_model("my-classifier", stage="production")
|
|
337
337
|
```
|
|
338
338
|
|
|
@@ -659,6 +659,155 @@ model = registry.get_model("sentiment-bert")
|
|
|
659
659
|
lineage = registry.get_model_lineage(model.id)
|
|
660
660
|
```
|
|
661
661
|
|
|
662
|
+
### Artifact Storage
|
|
663
|
+
|
|
664
|
+
Podstack stores every artifact you log — model files, plots, CSV exports, anything — in the project's cloud artifact store. Artifacts are keyed by run ID, so the same file can be retrieved from any machine, by any project member, at any time.
|
|
665
|
+
|
|
666
|
+
#### `log_artifact()` — upload a file for the active run
|
|
667
|
+
|
|
668
|
+
```python
|
|
669
|
+
# Upload a single file (uses the filename as the artifact path)
|
|
670
|
+
registry.log_artifact("model.pt")
|
|
671
|
+
|
|
672
|
+
# Upload with an explicit path inside the artifact store
|
|
673
|
+
registry.log_artifact("training_curves.png", artifact_path="plots/curves.png")
|
|
674
|
+
registry.log_artifact("feature_importance.csv", artifact_path="analysis/features.csv")
|
|
675
|
+
```
|
|
676
|
+
|
|
677
|
+
**Parameters:**
|
|
678
|
+
|
|
679
|
+
| Parameter | Type | Default | Description |
|
|
680
|
+
|-----------|------|---------|-------------|
|
|
681
|
+
| `local_path` | `str` | required | Path to the local file to upload |
|
|
682
|
+
| `artifact_path` | `str` | filename | Relative path inside the artifact store. Defaults to `os.path.basename(local_path)` |
|
|
683
|
+
|
|
684
|
+
If the artifact store is temporarily unreachable, the SDK saves the file to a local fallback cache (`~/.podstack/artifacts/<run_id>/`) so your run is never interrupted.
|
|
685
|
+
|
|
686
|
+
**Via the `Run` object** — equivalent to calling `registry.log_artifact()`:
|
|
687
|
+
|
|
688
|
+
```python
|
|
689
|
+
with registry.start_run("training-v1") as run:
|
|
690
|
+
run.log_artifact("confusion_matrix.png", artifact_path="plots/confusion_matrix.png")
|
|
691
|
+
run.log_artifact("model.pkl")
|
|
692
|
+
```
|
|
693
|
+
|
|
694
|
+
#### `list_artifacts()` — list all artifacts for a run
|
|
695
|
+
|
|
696
|
+
```python
|
|
697
|
+
artifacts = registry.list_artifacts(run_id)
|
|
698
|
+
for a in artifacts:
|
|
699
|
+
print(f"{a['path']:40s} {a['size'] / 1e6:.1f} MB {a['last_modified']}")
|
|
700
|
+
```
|
|
701
|
+
|
|
702
|
+
**Parameters:**
|
|
703
|
+
|
|
704
|
+
| Parameter | Type | Description |
|
|
705
|
+
|-----------|------|-------------|
|
|
706
|
+
| `run_id` | `str` | ID of the run to query |
|
|
707
|
+
|
|
708
|
+
**Returns:** `list[dict]` — one entry per artifact:
|
|
709
|
+
|
|
710
|
+
| Key | Type | Description |
|
|
711
|
+
|-----|------|-------------|
|
|
712
|
+
| `path` | `str` | Relative artifact path (e.g. `"plots/curves.png"`) |
|
|
713
|
+
| `size` | `int` | File size in bytes |
|
|
714
|
+
| `etag` | `str` | Content hash for integrity verification |
|
|
715
|
+
| `last_modified` | `str` | ISO 8601 upload timestamp |
|
|
716
|
+
|
|
717
|
+
#### `download_artifact()` — retrieve an artifact
|
|
718
|
+
|
|
719
|
+
Downloads a specific artifact from the cloud store into a local directory. Falls back to the local cache when the store is unreachable.
|
|
720
|
+
|
|
721
|
+
```python
|
|
722
|
+
# Download a single file
|
|
723
|
+
dest = registry.download_artifact("run-id", "model/model.pkl", "./downloads/")
|
|
724
|
+
print(f"Saved to: {dest}")
|
|
725
|
+
|
|
726
|
+
# Download a whole model directory
|
|
727
|
+
dest = registry.download_artifact("run-id", "model", "./local_models/")
|
|
728
|
+
```
|
|
729
|
+
|
|
730
|
+
**Parameters:**
|
|
731
|
+
|
|
732
|
+
| Parameter | Type | Description |
|
|
733
|
+
|-----------|------|-------------|
|
|
734
|
+
| `run_id` | `str` | ID of the run that logged the artifact |
|
|
735
|
+
| `artifact_path` | `str` | Relative artifact path as logged (e.g. `"model/model.pkl"`) |
|
|
736
|
+
| `local_path` | `str` | Destination directory |
|
|
737
|
+
|
|
738
|
+
**Returns:** `str` — absolute path to the downloaded file or directory.
|
|
739
|
+
|
|
740
|
+
**Raises:** `ArtifactNotFoundError` if the artifact cannot be found in the store or the local cache.
|
|
741
|
+
|
|
742
|
+
#### Models as artifacts: `log_model()` and `load_model()`
|
|
743
|
+
|
|
744
|
+
`log_model()` serializes your model to disk and uploads every resulting file to the artifact store in one call. `load_model()` resolves the registered model version, downloads any missing files from the store, then deserializes the model — so it works correctly from any machine regardless of where training happened.
|
|
745
|
+
|
|
746
|
+
```python
|
|
747
|
+
# ── Training machine ──────────────────────────────────────────────────────────
|
|
748
|
+
with registry.start_run("bert-finetune-v3") as run:
|
|
749
|
+
# train...
|
|
750
|
+
registry.log_model(model, artifact_path="model", framework="pytorch")
|
|
751
|
+
|
|
752
|
+
registry.register_model("sentiment-bert", run_id=run.id)
|
|
753
|
+
registry.set_model_stage("sentiment-bert", version=3, stage="production")
|
|
754
|
+
|
|
755
|
+
# ── Any machine (CI, inference server, colleague's laptop) ───────────────────
|
|
756
|
+
# Model files are downloaded automatically from the artifact store if not cached
|
|
757
|
+
model = registry.load_model("sentiment-bert", stage="production")
|
|
758
|
+
```
|
|
759
|
+
|
|
760
|
+
**`log_model()` parameters:**
|
|
761
|
+
|
|
762
|
+
| Parameter | Type | Default | Description |
|
|
763
|
+
|-----------|------|---------|-------------|
|
|
764
|
+
| `model` | any | required | Model object (PyTorch, TensorFlow, sklearn, HuggingFace, or any picklable object) |
|
|
765
|
+
| `artifact_path` | `str` | `"model"` | Sub-path inside the artifact store |
|
|
766
|
+
| `framework` | `str` | auto-detected | `"pytorch"`, `"tensorflow"`, `"sklearn"`, `"huggingface"`, or `"pickle"` |
|
|
767
|
+
| `metadata` | `dict` | `None` | Arbitrary key-value metadata stored as run params |
|
|
768
|
+
|
|
769
|
+
**`load_model()` parameters:**
|
|
770
|
+
|
|
771
|
+
| Parameter | Type | Default | Description |
|
|
772
|
+
|-----------|------|---------|-------------|
|
|
773
|
+
| `model_name` | `str` | required | Registered model name |
|
|
774
|
+
| `version` | `int` | `None` | Specific version to load. Mutually exclusive with `stage` |
|
|
775
|
+
| `stage` | `str` | `None` | Stage to load from: `"development"`, `"staging"`, `"production"`, `"archived"` |
|
|
776
|
+
| `framework` | `str` | from run params | Override framework for deserialization |
|
|
777
|
+
|
|
778
|
+
#### Viewing artifacts in the dashboard
|
|
779
|
+
|
|
780
|
+
Every artifact logged with `log_artifact()` or `log_model()` appears automatically in the **Artifacts tab** of the run's detail page in the Podstack dashboard. No extra steps are needed — the tab populates from the same store the SDK writes to.
|
|
781
|
+
|
|
782
|
+
The Artifacts tab shows:
|
|
783
|
+
|
|
784
|
+
| Column | Description |
|
|
785
|
+
|--------|-------------|
|
|
786
|
+
| **Path** | The relative artifact path as logged (e.g. `model/model.pkl`, `plots/curves.png`) |
|
|
787
|
+
| **Type badge** | File extension, color-coded by category — model weights, data files, images, configs, etc. |
|
|
788
|
+
| **Size** | Formatted file size (B / KB / MB) |
|
|
789
|
+
| **Uploaded** | Timestamp of when the file was stored |
|
|
790
|
+
| **Download** | One-click download button — opens a short-lived direct download link in the browser |
|
|
791
|
+
|
|
792
|
+
A footer below the list shows the combined size of all artifacts for the run.
|
|
793
|
+
|
|
794
|
+
```python
|
|
795
|
+
# Everything logged here shows up in the dashboard Artifacts tab
|
|
796
|
+
with registry.start_run("bert-finetune-v3") as run:
|
|
797
|
+
registry.log_params({"lr": 2e-5, "epochs": 3})
|
|
798
|
+
registry.log_metrics({"accuracy": 0.93})
|
|
799
|
+
|
|
800
|
+
# These all appear as separate rows in the Artifacts tab
|
|
801
|
+
registry.log_artifact("confusion_matrix.png", artifact_path="plots/confusion_matrix.png")
|
|
802
|
+
registry.log_artifact("feature_importance.csv", artifact_path="analysis/features.csv")
|
|
803
|
+
registry.log_model(model, artifact_path="model", framework="pytorch")
|
|
804
|
+
# ↳ each model file (model.pkl, config.json, etc.) appears as its own row
|
|
805
|
+
```
|
|
806
|
+
|
|
807
|
+
#### Access control
|
|
808
|
+
|
|
809
|
+
Artifact upload and download URLs are issued by the registry API and require a valid API key and project membership. The URLs are short-lived, ensuring that access always reflects the current state of your project — a revoked key can no longer generate new URLs. Any member of a project can upload and download artifacts for runs within that project.
|
|
810
|
+
|
|
662
811
|
### List and Browse
|
|
663
812
|
|
|
664
813
|
```python
|
|
@@ -670,8 +819,12 @@ experiments = registry.list_experiments()
|
|
|
670
819
|
# List models
|
|
671
820
|
models = registry.list_models()
|
|
672
821
|
|
|
673
|
-
#
|
|
674
|
-
registry.
|
|
822
|
+
# List artifacts for a specific run
|
|
823
|
+
artifacts = registry.list_artifacts(run_id)
|
|
824
|
+
|
|
825
|
+
# Download a specific artifact to a local directory
|
|
826
|
+
dest = registry.download_artifact("run-id", "model/model.pt", "./downloads/")
|
|
827
|
+
print(f"Saved to: {dest}")
|
|
675
828
|
```
|
|
676
829
|
|
|
677
830
|
## GPU Runner - Direct Code Execution
|
|
@@ -246,9 +246,9 @@ with registry.start_run(name="training-v1") as run:
|
|
|
246
246
|
# Set tags
|
|
247
247
|
registry.set_tag("framework", "pytorch")
|
|
248
248
|
|
|
249
|
-
#
|
|
250
|
-
registry.log_artifact("model.pt"
|
|
251
|
-
registry.log_artifact("training_curves.png", "plots")
|
|
249
|
+
# Upload artifacts to cloud artifact store
|
|
250
|
+
registry.log_artifact("model.pt")
|
|
251
|
+
registry.log_artifact("training_curves.png", artifact_path="plots/curves.png")
|
|
252
252
|
|
|
253
253
|
# Log dataset provenance (first-class resource, deduped by content hash)
|
|
254
254
|
registry.log_dataset("imdb-reviews", path="data/imdb.csv", context="training")
|
|
@@ -264,7 +264,7 @@ with registry.start_run(name="training-v1") as run:
|
|
|
264
264
|
```python
|
|
265
265
|
from podstack import registry
|
|
266
266
|
|
|
267
|
-
#
|
|
267
|
+
# Serialize and upload the model to the artifact store (auto-detects framework)
|
|
268
268
|
registry.log_model(model, artifact_path="model", framework="pytorch")
|
|
269
269
|
|
|
270
270
|
# Register in model registry
|
|
@@ -280,7 +280,7 @@ registry.set_model_stage("my-classifier", version=1, stage="production")
|
|
|
280
280
|
# Set aliases
|
|
281
281
|
registry.set_model_alias("my-classifier", alias="champion", version=1)
|
|
282
282
|
|
|
283
|
-
# Load model from
|
|
283
|
+
# Load model from any machine — files are downloaded automatically if missing locally
|
|
284
284
|
model = registry.load_model("my-classifier", stage="production")
|
|
285
285
|
```
|
|
286
286
|
|
|
@@ -607,6 +607,155 @@ model = registry.get_model("sentiment-bert")
|
|
|
607
607
|
lineage = registry.get_model_lineage(model.id)
|
|
608
608
|
```
|
|
609
609
|
|
|
610
|
+
### Artifact Storage
|
|
611
|
+
|
|
612
|
+
Podstack stores every artifact you log — model files, plots, CSV exports, anything — in the project's cloud artifact store. Artifacts are keyed by run ID, so the same file can be retrieved from any machine, by any project member, at any time.
|
|
613
|
+
|
|
614
|
+
#### `log_artifact()` — upload a file for the active run
|
|
615
|
+
|
|
616
|
+
```python
|
|
617
|
+
# Upload a single file (uses the filename as the artifact path)
|
|
618
|
+
registry.log_artifact("model.pt")
|
|
619
|
+
|
|
620
|
+
# Upload with an explicit path inside the artifact store
|
|
621
|
+
registry.log_artifact("training_curves.png", artifact_path="plots/curves.png")
|
|
622
|
+
registry.log_artifact("feature_importance.csv", artifact_path="analysis/features.csv")
|
|
623
|
+
```
|
|
624
|
+
|
|
625
|
+
**Parameters:**
|
|
626
|
+
|
|
627
|
+
| Parameter | Type | Default | Description |
|
|
628
|
+
|-----------|------|---------|-------------|
|
|
629
|
+
| `local_path` | `str` | required | Path to the local file to upload |
|
|
630
|
+
| `artifact_path` | `str` | filename | Relative path inside the artifact store. Defaults to `os.path.basename(local_path)` |
|
|
631
|
+
|
|
632
|
+
If the artifact store is temporarily unreachable, the SDK saves the file to a local fallback cache (`~/.podstack/artifacts/<run_id>/`) so your run is never interrupted.
|
|
633
|
+
|
|
634
|
+
**Via the `Run` object** — equivalent to calling `registry.log_artifact()`:
|
|
635
|
+
|
|
636
|
+
```python
|
|
637
|
+
with registry.start_run("training-v1") as run:
|
|
638
|
+
run.log_artifact("confusion_matrix.png", artifact_path="plots/confusion_matrix.png")
|
|
639
|
+
run.log_artifact("model.pkl")
|
|
640
|
+
```
|
|
641
|
+
|
|
642
|
+
#### `list_artifacts()` — list all artifacts for a run
|
|
643
|
+
|
|
644
|
+
```python
|
|
645
|
+
artifacts = registry.list_artifacts(run_id)
|
|
646
|
+
for a in artifacts:
|
|
647
|
+
print(f"{a['path']:40s} {a['size'] / 1e6:.1f} MB {a['last_modified']}")
|
|
648
|
+
```
|
|
649
|
+
|
|
650
|
+
**Parameters:**
|
|
651
|
+
|
|
652
|
+
| Parameter | Type | Description |
|
|
653
|
+
|-----------|------|-------------|
|
|
654
|
+
| `run_id` | `str` | ID of the run to query |
|
|
655
|
+
|
|
656
|
+
**Returns:** `list[dict]` — one entry per artifact:
|
|
657
|
+
|
|
658
|
+
| Key | Type | Description |
|
|
659
|
+
|-----|------|-------------|
|
|
660
|
+
| `path` | `str` | Relative artifact path (e.g. `"plots/curves.png"`) |
|
|
661
|
+
| `size` | `int` | File size in bytes |
|
|
662
|
+
| `etag` | `str` | Content hash for integrity verification |
|
|
663
|
+
| `last_modified` | `str` | ISO 8601 upload timestamp |
|
|
664
|
+
|
|
665
|
+
#### `download_artifact()` — retrieve an artifact
|
|
666
|
+
|
|
667
|
+
Downloads a specific artifact from the cloud store into a local directory. Falls back to the local cache when the store is unreachable.
|
|
668
|
+
|
|
669
|
+
```python
|
|
670
|
+
# Download a single file
|
|
671
|
+
dest = registry.download_artifact("run-id", "model/model.pkl", "./downloads/")
|
|
672
|
+
print(f"Saved to: {dest}")
|
|
673
|
+
|
|
674
|
+
# Download a whole model directory
|
|
675
|
+
dest = registry.download_artifact("run-id", "model", "./local_models/")
|
|
676
|
+
```
|
|
677
|
+
|
|
678
|
+
**Parameters:**
|
|
679
|
+
|
|
680
|
+
| Parameter | Type | Description |
|
|
681
|
+
|-----------|------|-------------|
|
|
682
|
+
| `run_id` | `str` | ID of the run that logged the artifact |
|
|
683
|
+
| `artifact_path` | `str` | Relative artifact path as logged (e.g. `"model/model.pkl"`) |
|
|
684
|
+
| `local_path` | `str` | Destination directory |
|
|
685
|
+
|
|
686
|
+
**Returns:** `str` — absolute path to the downloaded file or directory.
|
|
687
|
+
|
|
688
|
+
**Raises:** `ArtifactNotFoundError` if the artifact cannot be found in the store or the local cache.
|
|
689
|
+
|
|
690
|
+
#### Models as artifacts: `log_model()` and `load_model()`
|
|
691
|
+
|
|
692
|
+
`log_model()` serializes your model to disk and uploads every resulting file to the artifact store in one call. `load_model()` resolves the registered model version, downloads any missing files from the store, then deserializes the model — so it works correctly from any machine regardless of where training happened.
|
|
693
|
+
|
|
694
|
+
```python
|
|
695
|
+
# ── Training machine ──────────────────────────────────────────────────────────
|
|
696
|
+
with registry.start_run("bert-finetune-v3") as run:
|
|
697
|
+
# train...
|
|
698
|
+
registry.log_model(model, artifact_path="model", framework="pytorch")
|
|
699
|
+
|
|
700
|
+
registry.register_model("sentiment-bert", run_id=run.id)
|
|
701
|
+
registry.set_model_stage("sentiment-bert", version=3, stage="production")
|
|
702
|
+
|
|
703
|
+
# ── Any machine (CI, inference server, colleague's laptop) ───────────────────
|
|
704
|
+
# Model files are downloaded automatically from the artifact store if not cached
|
|
705
|
+
model = registry.load_model("sentiment-bert", stage="production")
|
|
706
|
+
```
|
|
707
|
+
|
|
708
|
+
**`log_model()` parameters:**
|
|
709
|
+
|
|
710
|
+
| Parameter | Type | Default | Description |
|
|
711
|
+
|-----------|------|---------|-------------|
|
|
712
|
+
| `model` | any | required | Model object (PyTorch, TensorFlow, sklearn, HuggingFace, or any picklable object) |
|
|
713
|
+
| `artifact_path` | `str` | `"model"` | Sub-path inside the artifact store |
|
|
714
|
+
| `framework` | `str` | auto-detected | `"pytorch"`, `"tensorflow"`, `"sklearn"`, `"huggingface"`, or `"pickle"` |
|
|
715
|
+
| `metadata` | `dict` | `None` | Arbitrary key-value metadata stored as run params |
|
|
716
|
+
|
|
717
|
+
**`load_model()` parameters:**
|
|
718
|
+
|
|
719
|
+
| Parameter | Type | Default | Description |
|
|
720
|
+
|-----------|------|---------|-------------|
|
|
721
|
+
| `model_name` | `str` | required | Registered model name |
|
|
722
|
+
| `version` | `int` | `None` | Specific version to load. Mutually exclusive with `stage` |
|
|
723
|
+
| `stage` | `str` | `None` | Stage to load from: `"development"`, `"staging"`, `"production"`, `"archived"` |
|
|
724
|
+
| `framework` | `str` | from run params | Override framework for deserialization |
|
|
725
|
+
|
|
726
|
+
#### Viewing artifacts in the dashboard
|
|
727
|
+
|
|
728
|
+
Every artifact logged with `log_artifact()` or `log_model()` appears automatically in the **Artifacts tab** of the run's detail page in the Podstack dashboard. No extra steps are needed — the tab populates from the same store the SDK writes to.
|
|
729
|
+
|
|
730
|
+
The Artifacts tab shows:
|
|
731
|
+
|
|
732
|
+
| Column | Description |
|
|
733
|
+
|--------|-------------|
|
|
734
|
+
| **Path** | The relative artifact path as logged (e.g. `model/model.pkl`, `plots/curves.png`) |
|
|
735
|
+
| **Type badge** | File extension, color-coded by category — model weights, data files, images, configs, etc. |
|
|
736
|
+
| **Size** | Formatted file size (B / KB / MB) |
|
|
737
|
+
| **Uploaded** | Timestamp of when the file was stored |
|
|
738
|
+
| **Download** | One-click download button — opens a short-lived direct download link in the browser |
|
|
739
|
+
|
|
740
|
+
A footer below the list shows the combined size of all artifacts for the run.
|
|
741
|
+
|
|
742
|
+
```python
|
|
743
|
+
# Everything logged here shows up in the dashboard Artifacts tab
|
|
744
|
+
with registry.start_run("bert-finetune-v3") as run:
|
|
745
|
+
registry.log_params({"lr": 2e-5, "epochs": 3})
|
|
746
|
+
registry.log_metrics({"accuracy": 0.93})
|
|
747
|
+
|
|
748
|
+
# These all appear as separate rows in the Artifacts tab
|
|
749
|
+
registry.log_artifact("confusion_matrix.png", artifact_path="plots/confusion_matrix.png")
|
|
750
|
+
registry.log_artifact("feature_importance.csv", artifact_path="analysis/features.csv")
|
|
751
|
+
registry.log_model(model, artifact_path="model", framework="pytorch")
|
|
752
|
+
# ↳ each model file (model.pkl, config.json, etc.) appears as its own row
|
|
753
|
+
```
|
|
754
|
+
|
|
755
|
+
#### Access control
|
|
756
|
+
|
|
757
|
+
Artifact upload and download URLs are issued by the registry API and require a valid API key and project membership. The URLs are short-lived, ensuring that access always reflects the current state of your project — a revoked key can no longer generate new URLs. Any member of a project can upload and download artifacts for runs within that project.
|
|
758
|
+
|
|
610
759
|
### List and Browse
|
|
611
760
|
|
|
612
761
|
```python
|
|
@@ -618,8 +767,12 @@ experiments = registry.list_experiments()
|
|
|
618
767
|
# List models
|
|
619
768
|
models = registry.list_models()
|
|
620
769
|
|
|
621
|
-
#
|
|
622
|
-
registry.
|
|
770
|
+
# List artifacts for a specific run
|
|
771
|
+
artifacts = registry.list_artifacts(run_id)
|
|
772
|
+
|
|
773
|
+
# Download a specific artifact to a local directory
|
|
774
|
+
dest = registry.download_artifact("run-id", "model/model.pt", "./downloads/")
|
|
775
|
+
print(f"Saved to: {dest}")
|
|
623
776
|
```
|
|
624
777
|
|
|
625
778
|
## GPU Runner - Direct Code Execution
|