Shipping a model like software
You will: Register, gate, promote and roll back a model.
Builds on When a model beats geometry, and why.
A model is not a file. It is a file, the data that produced it, the metrics that justify it, and a contract with the code that runs it. The registry stores all four and refuses anything missing one.
It is a directory and one pointer — no database, no service. Versions are content-addressed and immutable: a counter is state that can disagree with the files; a hash cannot. Production is a pointer, so promotion and rollback are the same operation, and rollback is as well tested as promotion. History is append-only, because "what was running last Tuesday?" is the first question after a failure.
Refusing is the feature. Every promotion runs five gates and reports all failures, not the first:
| gate | without it |
|---|---|
| validates | a model without metrics cannot be compared with anything |
| provenance | a robot running an untraceable model cannot be explained |
| feature contract | features served in a different order still produce numbers |
| beats baseline | worse than code needing no data and no training |
| no regression | the model in production is the thing to beat now |
Demonstrated on this project's first robot, not asserted: a deliberately degraded model was registered and refused by the last gate, at 95.0 mm against production's 10.5 mm. The regression gate is a tolerance, 5%, not a wall — a gate that forbids every trade-off gets bypassed routinely, and then means nothing for the cases that matter. Forcing a promotion is possible, and is recorded as forced, because a log that omits that every gate objected has lost its most useful fact.
Rollback is a pointer move. That is the entire reason for the indirection, and it is the same reason your deployments are symlinks rather than copies.
In the simulation
The registry is software and runs in the repository, not here. Its robot-side counterpart: a recording is an artefact that does exactly what it did when made, and going back to a known-good state is one move. The model the registry would manage is planned.
Kinematic: joints move at their real speed limit, but there is no gravity, no load and no physics.
The SO-101 loads as you reach it.
make drive keysIn this lesson
- Press Record, move the arm to a pose of your choice, and press Record again to stop. That is the artefact.
- Press Replay. What runs is the recorded thing, not a fresh guess, as production runs the promoted version.
- Roll back: press
h(or home). One move to a known-good state.
Joints · SO-101 follower
1–5 joint · , . jog · [ ] jaw · - + step · h home · f frames
the keys of make drive
The buttons do what the keys do: hold one to repeat.
Limits from the description; speed capped at 1.7434 rad/s, the servo's datasheet derated. Poses from the profile.
Inspector
Code
The repository's own code behind what you do here appears once you move the arm.
Terms
- Model registry
- Versioned storage for models with their data, metrics and contract, plus a production pointer.
- Content-addressed version
- A version identifier computed from the artefact's bytes, so the same content always gets the same id and different content never does.
- Promotion gate
- A check a model must pass before production points at it.