Files
chenlin c32df70326
Checks / Layout, translation and Colab checks (push) Has been cancelled
Checks / Ruff (push) Has been cancelled
Checks / Framework tests (native backend, CPU) (push) Has been cancelled
Checks / Portable Rust controller (push) Has been cancelled
release: v0.1 generic robot training and application platform
2026-11-05 11:05:01 +08:00

61 lines
3.1 KiB
Markdown

# Train and replay on Colab
[Notebook](../notebooks/robot_colab.ipynb) · [中文](COLAB.zh.md)
Upload a copy of `notebooks/robot_colab.ipynb` to Google Colab. Select
**Runtime → Change runtime type → GPU**. Keep the notebook and source checkout
on matching revisions.
## Prepare a new robot run
1. Onboard the robot locally using [the workflow](WORKFLOWS.md). Commit its
literal `tasks/<robot_id>/robot_spec.py`, MJCF, referenced assets and any
control file to the GitHub revision you intend to clone. Keep the model's
asset paths portable within that checkout.
2. Fill `TASK` with the robot ID and `MODEL` with its registered model name
from `python scripts/train.py --list`. The notebook requires both
explicitly. In Advanced source enter `REPOSITORY_URL` and
`SOURCE_REVISION` for the checkout containing those inputs.
3. Run setup. It verifies the requested commit, isolated interpreter, CUDA
arithmetic, Warp kernel and NVIDIA EGL before training. Reused checkouts
are never switched or reset automatically.
4. Choose `NUM_ENVS` and `ITERATIONS` for the model and GPU. The optional
smoke uses at most 256 environments for five updates. Optional preview
takes a compatible `DEMO_CHECKPOINT` for this task and model. Both run
separately from the selected checkpoint.
## Resume a recorded run
Select **Continue training**. Upload a backup ZIP or choose a completed
Drive checkpoint snapshot. The notebook reads its bounded metadata before
installation and restores the recorded task, model, batch, commit, and
core package versions. Older backups may require the original repository
URL in Advanced source. Use the notebook from the recorded source if its
workflow differs.
A restore validates file paths, archive checksums, and checkpoint hashes
before choosing the recorded checkpoint. Resume also checks the source
identity and runtime settings. `ITERATIONS` is the additional update budget.
The optimizer and curriculum state resume with the policy. Environments
begin new episodes. Re-running a settings cell keeps the selected checkpoint.
## Evaluate and keep results
Training writes `logs/<model>/<robot_id>/<timestamp>/`. The progress cell
reads the selected run's TensorBoard events and exports curves and scalar
data. Replay can record inline video and joint measurements. Velocity replay
uses the checkpoint's command ranges. The fixed-command cell tests forward,
sideways, turn, and stand separately. It skips axes fixed at zero, such as
wheeled-biped lateral motion. Set custom commands within the trained ranges.
Report the scene, noise setting, command, tracking errors, duration, and resets.
The export cell writes the ONNX graph, layout, checkpoint copy, and README.
Hybrid wheeled policies export with the native layout and replay model.
A failed replay or export does not prevent backup of a complete checkpoint. Download the run ZIP or verify the optional Drive snapshots
before the runtime ends. Saving the notebook itself preserves code and
displayed outputs.
Colab files, recorded simulation and adapter parity describe the selected
model and runtime. Use native command verification before packaging a
controlled application.