Compute
The question is never "which cloud is best"; it is "which of the targets this user has
configured fits this run, and what will it cost". Discover before you plan, size before
you dispatch, and hand anything longer than a coffee to the job system so the session,
the logs and the metrics outlive the shell.
Rules
- Targets first.
compute_job {"action":"targets"} lists what exists: local runtime,
saved SSH and scheduler hosts, Modal when connected. Plan only against a listed target.
A provider skill from the library (modal-serverless-gpu, runpod-gpu-cloud,
lambda-gpu-cloud, vast-ai-gpu-cloud, skypilot-multi-cloud-orchestration,
together-ai-inference, fireworks-ai-inference, tinker-fine-tuning; the core index
lists them) is loaded only when that provider is configured or the user asks to set it
up; never plan work for compute the user does not have.
- Local shell for seconds, kernel for interactive state, job for everything else. A
command that may exceed a few minutes, needs a GPU, or must survive a disconnect goes
through
compute_job start; a job that settles within the dispatch's grace returns its
outcome and output tail in that step, a longer one wakes you when it ends. Never a shell
sleep loop, and no wait while other work can proceed.
- Size and price before dispatch. Estimate wall-clock from a short local or scaled-down
run, choose the smallest instance that fits memory and time, and state the estimate
(provider, GPU, duration, price) in the approval. Remote jobs are approved against an
immutable plan digest;
compute_job plan previews it.
- Declare outputs. Artifacts and checkpoints are relative paths under the job
workspace, listed in the request, so they are delivered and survive. Nothing important
is written to
/tmp or printed only to the terminal.
- Track metrics. Training and evaluation scripts import
openscience_track (or
wandb, shimmed inside a study) so curves and final numbers land in the Autoresearch
pane and the experiments tool instead of a log to grep.
- Checkpoint long runs and make them resumable from the declared checkpoint path; the
job system can be interrupted by the user, a budget, or a kill rule.
Choosing the target
| Run |
Target |
| Seconds to two minutes, CPU, output read immediately |
shell or the Python kernel |
| Minutes to hours, CPU or the local GPU |
compute_job local |
| Needs a GPU the machine lacks, or many GPUs |
Modal (gpu set to the exact type), or a saved SSH/Slurm host |
| Must run inside the user's cluster environment or data boundary |
the saved SSH or scheduler host |
| A sweep of many short runs |
one job per run through autoresearch, or one job with an internal loop when runs are seconds long |
For a Slurm or PBS host, resources (cpus, gpus, memory_gb, time_minutes,
partition) become the scheduler request; modules and container load the environment.
For Modal, packages or image define the environment and outbound network is off
unless enabled in Compute settings; do not submit jobs that download models or data
without checking that setting.
Workflow
Working directory. cwd is the directory that holds the code, named relative to
Session scratch or Project files (autoresearch_churn, then command: "python train.py").
Remote targets snapshot that Project-files directory into Session scratch before planning,
so the job sees the files as they are at dispatch. The Project-files root itself is not a
working directory; point at the subdirectory.
Probe. Ten training steps or one batch locally, timed, tells you the throughput; scale
to the full run and add 20%. Memory: a single forward and backward pass at the target
batch size. If the probe cannot run locally, read the model card or the paper for
reported throughput on the target GPU and say the estimate is second-hand.
Pricing. Duration × the provider's hourly rate for the instance, plus storage or egress
when relevant. Give one number and its basis; for anything over a few dollars, or any run
over an hour, state it before dispatch even under an autonomous setting.
Failure. compute_job logs first, with enough bytes to reach the traceback. Fix the
cause, not the symptom; a retry of an identical command is only justified after a
transient failure (preemption, network). Interrupted jobs resume from the checkpoint.
Provider accounts
Credentials live in Customize → Compute. provider_compute reads account, inventory and
job status for TensorPool, Lambda, Prime Intellect, Vast.ai and RunPod through the host
broker, read-only. Never ask the user to paste a key into chat, never put a key in a shell
command, and never claim a run happened that the job record does not show.
Before you hand it over
- The job's name says what it computed; its artifacts are declared and delivered.
- The estimate you gave is compared with what it actually took.
- Metrics are tracked, or the reason they could not be is stated.
1---2name: compute3description: Chooses and runs compute for research work, local shell or kernel versus a detached compute_job on this machine, a saved SSH or Slurm host, or Modal GPUs, with the target discovered from what is actually configured, the run sized and priced before dispatch, outputs declared, metrics tracked, and long work handed to the job system instead of a blocking shell. Use when a task needs a GPU, will run longer than a few minutes, must survive the session, or asks which cloud or provider to use. Provider-specific setup lives in the cloud-compute library skills; load one only after compute_job targets shows that provider.4summary: "Pick and price the compute target; long or GPU work through compute_job, tracked."5category: core6role: support7allowed-tools: [Read, Bash, compute_job, provider_compute, experiments]8license: MIT9version: 1.0.010author: Synthetic Sciences11metadata:12 source: https://skillmd.com/skills/synthetic-sciences/compute13 skill-author: Synthetic Sciences14---1516# Compute1718The question is never "which cloud is best"; it is "which of the targets this user has19configured fits this run, and what will it cost". Discover before you plan, size before20you dispatch, and hand anything longer than a coffee to the job system so the session,21the logs and the metrics outlive the shell.2223## Rules24251. **Targets first.** `compute_job {"action":"targets"}` lists what exists: local runtime,26 saved SSH and scheduler hosts, Modal when connected. Plan only against a listed target.27 A provider skill from the library (`modal-serverless-gpu`, `runpod-gpu-cloud`,28 `lambda-gpu-cloud`, `vast-ai-gpu-cloud`, `skypilot-multi-cloud-orchestration`,29 `together-ai-inference`, `fireworks-ai-inference`, `tinker-fine-tuning`; the core index30 lists them) is loaded only when that provider is configured or the user asks to set it31 up; never plan work for compute the user does not have.322. **Local shell for seconds, kernel for interactive state, job for everything else.** A33 command that may exceed a few minutes, needs a GPU, or must survive a disconnect goes34 through `compute_job start`; a job that settles within the dispatch's grace returns its35 outcome and output tail in that step, a longer one wakes you when it ends. Never a shell36 `sleep` loop, and no `wait` while other work can proceed.373. **Size and price before dispatch.** Estimate wall-clock from a short local or scaled-down38 run, choose the smallest instance that fits memory and time, and state the estimate39 (provider, GPU, duration, price) in the approval. Remote jobs are approved against an40 immutable plan digest; `compute_job plan` previews it.414. **Declare outputs.** Artifacts and checkpoints are relative paths under the job42 workspace, listed in the request, so they are delivered and survive. Nothing important43 is written to `/tmp` or printed only to the terminal.445. **Track metrics.** Training and evaluation scripts import `openscience_track` (or45 `wandb`, shimmed inside a study) so curves and final numbers land in the Autoresearch46 pane and the experiments tool instead of a log to grep.476. **Checkpoint long runs** and make them resumable from the declared checkpoint path; the48 job system can be interrupted by the user, a budget, or a kill rule.4950## Choosing the target5152| Run | Target |53| --- | --- |54| Seconds to two minutes, CPU, output read immediately | shell or the Python kernel |55| Minutes to hours, CPU or the local GPU | `compute_job` local |56| Needs a GPU the machine lacks, or many GPUs | Modal (`gpu` set to the exact type), or a saved SSH/Slurm host |57| Must run inside the user's cluster environment or data boundary | the saved SSH or scheduler host |58| A sweep of many short runs | one job per run through autoresearch, or one job with an internal loop when runs are seconds long |5960For a Slurm or PBS host, resources (`cpus`, `gpus`, `memory_gb`, `time_minutes`,61`partition`) become the scheduler request; `modules` and `container` load the environment.62For Modal, `packages` or `image` define the environment and outbound network is off63unless enabled in Compute settings; do not submit jobs that download models or data64without checking that setting.6566## Workflow6768- [ ] `targets`: what exists.69- [ ] Probe: a scaled-down local run to measure time and memory per unit of work.70- [ ] Size: instance, duration, price; write the estimate.71- [ ] `plan` (remote) then `start` with name, purpose, command, cwd, artifacts, checkpoint.72- [ ] `wait`; read `logs` on failure; `artifacts` on success.7374**Working directory.** `cwd` is the directory that holds the code, named relative to75Session scratch or Project files (`autoresearch_churn`, then `command: "python train.py"`).76Remote targets snapshot that Project-files directory into Session scratch before planning,77so the job sees the files as they are at dispatch. The Project-files root itself is not a78working directory; point at the subdirectory.7980**Probe.** Ten training steps or one batch locally, timed, tells you the throughput; scale81to the full run and add 20%. Memory: a single forward and backward pass at the target82batch size. If the probe cannot run locally, read the model card or the paper for83reported throughput on the target GPU and say the estimate is second-hand.8485**Pricing.** Duration × the provider's hourly rate for the instance, plus storage or egress86when relevant. Give one number and its basis; for anything over a few dollars, or any run87over an hour, state it before dispatch even under an autonomous setting.8889**Failure.** `compute_job logs` first, with enough bytes to reach the traceback. Fix the90cause, not the symptom; a retry of an identical command is only justified after a91transient failure (preemption, network). Interrupted jobs resume from the checkpoint.9293## Provider accounts9495Credentials live in Customize → Compute. `provider_compute` reads account, inventory and96job status for TensorPool, Lambda, Prime Intellect, Vast.ai and RunPod through the host97broker, read-only. Never ask the user to paste a key into chat, never put a key in a shell98command, and never claim a run happened that the job record does not show.99100## Before you hand it over101102- The job's name says what it computed; its artifacts are declared and delivered.103- The estimate you gave is compared with what it actually took.104- Metrics are tracked, or the reason they could not be is stated.