Train on your data

You have pick.solarian.zip from the collector, or a session from solarian record. The training file is a copy of the example run, pointed at this dataset. The controller is still the one from Tutorial 4.

Drop the short takes

The project scaffold wrote a dataset op for this: so106/dataset_ops/drop_short_episodes.py. It throws away episodes under a minimum number of rows, which is the usual shape of a false start. List it to confirm the project picked it up:

solarian dataset ops

You should see drop-short-episodes in the list. An op never rewrites its input. It writes a new version, so you start a curated copy and apply the filter there:

solarian dataset new pick.solarian.zip data/pick-curated
solarian dataset apply data/pick-curated drop-short-episodes --param min_frames=60
solarian dataset export data/pick-curated pick-curated.solarian.zip

solarian dataset log data/pick-curated shows the version. If the filter kept everything, your takes were already long enough. If the export is empty, min_frames is above a real take: look at one episode and lower the number, rather than recording slower to satisfy the filter.

The op is a filter. It does not rewrite video. Dataset ops is the rest of what an op can do. You do not need those for a first pick.

Train

cp conf/training/pick_example.yaml conf/training/pick_mine.yaml

In pick_mine.yaml set:

job_name: pick_mine

and point task.dataset_mix at the exported zip:

dataset_mix:
  - path: pick-curated.solarian.zip

Use the path you actually have. A session directory from solarian record is a valid path too; the trainer accepts the zip and the directory. Run dataset new on that directory the same way if you want the short takes dropped first.

solarian train --conf conf/training/pick_mine

The checkpoint is models/pick_mine/checkpoints/latest.ckpt. Same as the example run, different job_name, so you do not overwrite pick_example.

Run it

In the deployment file for the machine that will run the policy server:

policy_checkpoint: models/pick_mine/checkpoints/latest.ckpt

Restart solarian run-service pick. Restart the robot if it was up. Press 4.

In simulation, put an object in the wrist image that matches what you demonstrated. On the real arm, put that object on the table, in frame, and press 4 with sim=false. The real-arm chapter still applies: a checkpoint trained on Lumi's camera is aimed with your lens remap and your ik_tcp. Skip those and the new weights will miss in the same direction the old ones did.

Press 0 when you want the arm back. Watch a few episodes before you record fifty more. The misses tell you what the next dataset needs: a different start position, a slower hand, an object that was leaving the frame. That loop — record, drop the bad takes, train, run — is the whole of this tutorial.

Solarian Base will host the same pick_mine.yaml if you would rather not train on the laptop. The file does not change. The pointer is Training & Runs.

Was this page helpful?