Operate a deployment
Use these tasks on a running deployment: check it, choose what serves and where training starts, set how often training saves, and recover after a restart.
Before you start #
Set REEF_URL and REEF_TOKEN. The examples use the scenario code-repair.
Check health and status #
curl -f "$REEF_URL/healthz"
curl -sS -H "Authorization: Bearer $REEF_TOKEN" "$REEF_URL/reef/status"/healthz answers {"ok": true} when HTTP is up, without checking engines. /reef/status shows jobs and errors. Each process that reef serve starts logs to <reef.run-dir>/<process>.log: reef.log for the Reef server, inference.log for a local inference engine and generator.log for the generator.
Read the artifacts #
curl -sS -H "Authorization: Bearer $REEF_TOKEN" "$REEF_URL/reef/scenarios/code-repair/artifacts"A new scenario starts from the base model or harness seed (operation: creation); see the artifact API.
Set what a scenario serves #
curl -sS -X POST -H "Authorization: Bearer $REEF_TOKEN" \
-H "Content-Type: application/json" -d '{"served": {"<id>": 100}}' \
"$REEF_URL/reef/scenarios/code-repair/update"Traffic splits gives the body rules. Runtime limits:
-
Tinker serves any number of artifacts per scenario; an adapter engine serves one.
-
Full weights need one remote component per checkpoint (inference.remote.url and inference.remote.slot-urls).
-
A removed artifact's route stops inference.timeout-s plus 5 seconds (305 by default) after the new routes publish, later if serving work or a release fails. No API reports free slots: if a replacement fails, wait and resend.
To check it, poll GET /reef/scenarios/code-repair/inference/status?model=<id> until state is ready.
Activation rule #
activation.module decides whether a new artifact serves: always (default), never, or evaluated (activation section). Under always, review_kinds holds back the listed harness changes. To check it, read active in the artifact list after a job.
Train from an artifact #
curl -sS -X POST -H "Authorization: Bearer $REEF_TOKEN" \
-H "Content-Type: application/json" -d '{"artifact_id": "<id>"}' \
"$REEF_URL/reef/scenarios/code-repair/train-from"This moves the default training start and cancels the job from the old one; serving does not change. For one job, use manual train_from; to roll back serving, restore; for backend rules, see the API. To check it, the next training artifact's parent_artifact_id is <id>.
Slime cannot train from another deployment's artifact. To continue from its checkpoint, create a new deployment and scenario with new save and save-hf directories, and set training.options.load to the old directory and ckpt-step to the rollout.
Set the checkpoint cadence #
Set recipe.config.job_parameters.save_interval (units in job parameters; Tinker counts optimizer steps). Every job also saves at its end. Megatron also needs its own save-interval when save is set.
Slime retention keeps the next job's start, and a job fails when its checkpoint does not fit. training.options.reef-checkpoint-max-storage and reef-checkpoint-min-free-space set absolute limits. Retention plans for about 8 times the HF export per saved rollout, 2 times with --no-save-optim (each job then rebuilds the fp32 master weights from bf16 and starts Adam again), and 1.2 times with LoRA. To check it, GET /reef/scenarios/code-repair/jobs lists each job's checkpoints by step.
Restart and recovery #
Keep the stores and checkpoints persistent. After a restart, training resumes from the last save; unsaved work runs again. When a scenario's artifact_head_sync.state is conflict, later commits wait and the earlier commit stays. To check recovery, read /reef/status. See control failover and the commit order.
Troubleshoot #
Read the response body, /reef/status and the logs under reef.run-dir (default .reef/run/). Find the symptom, then apply its fix.
Reef does not start #
reef serve -c deploy.yaml --print-config shows each setting and its source. Flags override the file, and the file reads environment variables only through ${VAR}. Paths are relative to the working directory. When readiness fails, check model downloads, GPUs and inference.log.
A request fails #
-
401: check the Bearer token. 404: check the scenario and what it serves.
-
503 during startup: poll /reef/scenarios/{scenario}/inference/status until state is ready.
-
Other: see the inference errors; most provider 4xx pass through.
A report does not train #
-
No job: check job_data_ready and pipeline in the status, and whether the group is complete. Consumed or stale samples do not train again.
-
400: the body names the failed check. 409: send the same content again, or use another agent_record_id.
-
Failed job: read its traceback and check the recipe's loss flags.
-
Disk full: see checkpoint retention; move files Reef does not own out of the checkpoint directory.
-
Work repeats after a restart: only saved checkpoints keep progress.
-
Slime job fails after train-from: the artifact is from another deployment, or retention deleted its checkpoint; start a new deployment from the checkpoint.
A harness does not change #
-
A tie or an unchanged tree publishes nothing: read the step page. Check the model's tool-call support and the evaluation timeouts.
-
No receipts: upgrade reef-client. No endpoint binding: install with reef-client harness connect.
-
Sync refuses: fix the changed files and sync again, or drop them with sync --discard.