You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`configure_optimizer`gives full optimizer and LR control. Use it for custom optimizers, parameter groups, schedulers, or learning rates that should not be reduced to evaluator fallback choices. Without that hook, the fallback optimizer may apply safe evaluator defaults/caps, including learning-rate caps.
67
73
68
-
`train_step`can implement a fully custom update step. Use it when you need a training loop other than the evaluator default. It must return a loss tensor and stay within sandbox and resource limits.
74
+
`train_step`can implement a fully custom update step. Use it when you need a training loop other than the evaluator default. It must return a loss tensor and stay within sandbox and resource limits. PRISM launches 1-8 GPU container runs with single-node torchrun, including `torchrun --standalone --nnodes=1 --nproc-per-node=1` for a 1 GPU run. When PRISM wraps default multi-process training with DDP, a custom `train_step` that bypasses the default loop must be DDP-safe and rank-aware.
75
+
76
+
Use `save_checkpoint(model, checkpoint_dir, ctx)` and `load_checkpoint(model, checkpoint_dir, ctx)` only for model state inside the evaluator-provided checkpoint workspace. The checkpoint fields on `ctx` are `checkpoint_dir`, `resume_checkpoint_dir`, `checkpoint_api_version`, `attempt`, `is_resume`, `rank`, `local_rank`, `world_size`, `distributed_backend`, `device`, and `checkpoint_metadata`. `save_checkpoint` may return `None`, a checkpoint-dir-relative `str`, or the exact shape `{"path": str, "metadata": dict[str, object]}`. Return `None` only when no checkpoint artifact should be recorded; return a checkpoint-dir-relative `str` or the exact dict shape when PRISM should accept and record a produced checkpoint artifact. PRISM records accepted checkpoint artifacts through manifest paths under the run artifact root. External checkpoint paths and miner-selected resume sources are not supported. The workspace cap is decimal 10G, exactly `10_000_000_000` bytes.
77
+
78
+
Evaluator resume in v1 is retry-only after eligible infrastructure or eviction failures. It does not resume sandbox failures, miner code failures, scoring failures, or policy failures.
For broker-backed runs, PRISM sends only the official Platform SDK GPU field `gpu_count`. `gpu_count=None` or an omitted field is CPU-only; a positive integer is a GPU request. Platform owns `gpu_resource_name`, defaulting to `nvidia.com/gpu`, and Kubernetes broker mode maps positive counts to `resources.limits['nvidia.com/gpu']` unless Platform is configured with a different resource name. PRISM GPU device IDs are metadata for observability, not Kubernetes placement semantics. Single-GPU runs use `torchrun --standalone --nnodes=1 --nproc-per-node=1`; PRISM does not claim multi-node support.
Copy file name to clipboardExpand all lines: docs/scaling.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,20 @@ Official score-eligible GPU runs use a fixed runtime profile. The default policy
44
44
45
45
Official scoring uses the fixed profile from SQL runtime config or its defaults. Autosplit is allowed only for non-scoring or development paths such as smoke runs. It is not an official scoring shortcut.
46
46
47
+
### Broker GPU Contract
48
+
49
+
PRISM passes the actual lease size to the Platform broker as `gpu_count`. `gpu_count=None` or an omitted `gpu_count` means CPU-only execution and must not create a Kubernetes GPU resource limit. A positive integer requests that many GPUs. Invalid values such as `0`, negatives, booleans, strings, or floats fail validation before placement.
50
+
51
+
Platform owns `gpu_resource_name`; PRISM does not pass it. In Kubernetes broker mode, Platform maps a positive `gpu_count` to `resources.limits['nvidia.com/gpu']` by default, or to the configured Platform-owned resource name. Prism GPU environment variables, labels, payload metadata, and device IDs are observability and backward-compatibility metadata only. Device IDs are not Kubernetes placement semantics, and this contract is not an arbitrary TPU, AMD, or custom accelerator abstraction.
52
+
53
+
## Single-Node Torchrun And DDP
54
+
55
+
PRISM's distributed v1 scope is single-node only. Runs with 1-8 GPUs use single-node torchrun with one process per GPU, including `torchrun --standalone --nnodes=1 --nproc-per-node=1` for a 1 GPU run. Requests above 8 GPUs are rejected. This documents command and environment support, not proof that every submission succeeds on 8 GPUs.
56
+
57
+
PRISM DDP-wraps default training before running the default loop. Rank 0 writes shared checkpoint and manifest artifacts, including `prism_run_manifest.v1.json`; other ranks participate in training and synchronization without writing those shared artifacts. Custom `train_step` implementations that bypass the default loop must be DDP-safe and rank-aware.
58
+
59
+
PRISM does not support multi-node distributed training in v1.
60
+
47
61
## Bad Scaling Predictors
48
62
49
63
The following signals are weak predictors of frontier-scale performance when used alone:
Copy file name to clipboardExpand all lines: docs/security.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,7 +104,15 @@ Container limits include:
104
104
* read-only runtime option
105
105
* optional GPU type and count
106
106
107
-
Official score-eligible GPU jobs use the fixed official GPU profile from SQL runtime config or defaults, with a maximum of 8 GPUs. Autosplit is for non-scoring or development paths only.
107
+
Official score-eligible GPU jobs use the fixed official GPU profile from SQL runtime config or defaults, with a maximum of 8 GPUs. Autosplit is for non-scoring or development paths only. PRISM sends the actual lease size as `gpu_count`: `None` or omitted means CPU-only, while a positive integer requests GPUs. Platform owns `gpu_resource_name` and maps the count to Kubernetes `resources.limits['nvidia.com/gpu']` by default. PRISM does not pass `gpu_resource_name`; device IDs remain metadata for logs and manifests, not Kubernetes placement semantics. Network isolation depends on the cluster CNI and the NetworkPolicy enforcement configured by Platform and the operator.
108
+
109
+
## Checkpoint Workspace Security
110
+
111
+
Checkpoint hooks write only inside an evaluator-owned checkpoint workspace. PRISM rejects absolute paths, `..` traversal, symlinks, and any checkpoint path outside that workspace. The checkpoint workspace cap is decimal 10G, exactly `10_000_000_000` bytes.
112
+
113
+
Evaluator resume in v1 is retry-only after eligible infrastructure or eviction failures, with validated same submission, code, architecture, and recipe lineage. It is not used for sandbox failures, miner code failures, scoring failures, or policy failures. Miners cannot select arbitrary external checkpoint paths or resume sources, and PRISM does not support object-store or cloud checkpoint upload in this contract.
114
+
115
+
Distributed execution is single-node only in v1. PRISM launches 1-8 GPU container runs with single-node torchrun, including `torchrun --standalone --nnodes=1 --nproc-per-node=1` for a 1 GPU run. PRISM does not support multi-node distributed training.
| `save_checkpoint` | Save model state into the evaluator-provided checkpoint workspace. | Training owner |
106
+
| `load_checkpoint` | Load model state from an evaluator-approved retry checkpoint workspace. | Training owner |
99
107
100
108
Use `configure_optimizer` when you need complete optimizer and LR control, including parameter groups, custom optimizer classes, scheduler setup, clipping wrappers, or learning rates outside evaluator defaults. If `configure_optimizer` is absent, the fallback optimizer may apply safe evaluator defaults/caps, including learning-rate caps, while still reading recipe metadata where allowed.
101
109
102
-
Use `train_step` when the default `zero_grad`, `loss.backward`, gradient clipping, and `optimizer.step` loop is not enough. `train_step` can implement a fully custom update step, as long as it returns a valid loss tensor and stays within the sandbox and resource limits.
110
+
Use `train_step` when the default `zero_grad`, `loss.backward`, gradient clipping, and `optimizer.step` loop is not enough. `train_step` can implement a fully custom update step, as long as it returns a valid loss tensor and stays within the sandbox and resource limits. PRISM launches 1-8 GPU container runs with single-node torchrun, including `torchrun --standalone --nnodes=1 --nproc-per-node=1` for a 1 GPU run. When PRISM launches multi-process torchrun/DDP, PRISM wraps the model, but custom `train_step` implementations are responsible for DDP-safe and rank-aware behavior if they bypass the default loop. PRISM does not support multi-node distributed training.
103
111
104
112
If both `inference_logits` and `infer` exist, `inference_logits` takes precedence.
105
113
114
+
## Checkpoint Hooks
115
+
116
+
Submissions may define these exact optional hook signatures:
117
+
118
+
```python
119
+
def save_checkpoint(model, checkpoint_dir, ctx):
120
+
...
121
+
122
+
def load_checkpoint(model, checkpoint_dir, ctx):
123
+
...
124
+
```
125
+
126
+
`checkpoint_dir`is an evaluator-owned directory. Save into that directory or a child path under it. Do not choose an external checkpoint path. `load_checkpoint` is called only when PRISM approves a retry resume source for the same submission, code, architecture, and recipe lineage. v1 resume is retry-only after eligible infrastructure or eviction failures, not sandbox failures, miner code failures, scoring failures, or policy failures. PRISM does not support arbitrary external checkpoint resume.
127
+
128
+
Checkpoint and distributed fields on `ctx` are:
129
+
130
+
* `checkpoint_dir`
131
+
* `resume_checkpoint_dir`
132
+
* `checkpoint_api_version`
133
+
* `attempt`
134
+
* `is_resume`
135
+
* `rank`
136
+
* `local_rank`
137
+
* `world_size`
138
+
* `distributed_backend`
139
+
* `device`
140
+
* `checkpoint_metadata`
141
+
142
+
Accepted `save_checkpoint` return schemas are:
143
+
144
+
* `None`, when no checkpoint artifact was produced for PRISM to record.
145
+
* A checkpoint-dir-relative `str`, when the main checkpoint file or directory is below `checkpoint_dir` and should be accepted and recorded.
146
+
* The exact shape `{"path": str, "metadata": dict[str, object]}`. `path` is checkpoint-dir-relative, and `metadata` contains JSON-compatible checkpoint metadata for an accepted and recorded checkpoint artifact.
147
+
148
+
Writing files under `checkpoint_dir` is not enough for PRISM to record a produced checkpoint. Return a checkpoint-dir-relative `str` or the exact dict shape above when the hook creates a checkpoint artifact that should be accepted for manifest recording and retry resume.
149
+
150
+
Absolute paths, `..` traversal, symlinks, and paths outside `checkpoint_dir` are rejected. PRISM records accepted checkpoint artifacts in `prism_run_manifest.v1.json` using artifact-root-relative manifest paths, not host paths. The checkpoint workspace cap is exactly decimal 10G, `10_000_000_000` bytes.
151
+
106
152
## Artifact Manifest
107
153
108
154
Official and smoke evaluators write `prism_run_manifest.v1.json`. The manifest is the scoring contract for artifacts and metrics, not a free-form log. Submitted metrics are not free-form claims. They must be derived from artifacts, evaluator logs, and manifest fields that validators can check.
0 commit comments