Repository navigation
perf(training): cut data-loader stalls and skip unused tactile decode - #15
Conversation
- `SelectiveVideoLeRobotDataset.decode_video_keys` now defaults to `None`
("decode everything") instead of an empty whitelist. A construction site
that forgets to set it degrades to plain `LeRobotDataset` behaviour rather
than silently decoding nothing and training on missing images. Covered by
a new test.
- Escape the regex metacharacters in the `pytest.raises(match=...)` pattern
so `ruff check` passes again (RUF043).
- Drop `docs/data-pipeline-stalls.html`: it duplicates the `.md` in the same
directory, nothing references it, and two copies of one document only drift.
- Document the new top-level `strict_batch_order` in `_FULL_REFERENCE.yaml`,
alongside `num_workers`.
- Translate the comments in the two new H100 configs to English, matching
every other file under `configs/_examples/`.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The data loader now passes `in_order=` to `torch.utils.data.DataLoader`, which landed in torch 2.6. The declared floor of 2.2.1 would resolve to versions that raise `TypeError: unexpected keyword argument 'in_order'` at construction. requirements.txt already pins torch==2.7.1, so no lock regeneration is needed; this only corrects the declared lower bound. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…llings
The `tactile` switch matches by substring, which is correct and stays
correct — but the comment, the doc table and the test fixture all spelled
the streams `_tactile_{0,1}`, which reads as the naming rather than as one
of two.
lerobot-xense suffixed the tactile cameras by USB enumeration order until
`1146d034` and by the jaw the pad sits on (serial parity) after it, and a
recorded stream is named after its lerobot camera key. So both spellings
are on disk, and `TACTILE_KEY_MARKER` catching either is load-bearing
rather than incidental.
Says so where it matters, and parametrises the decode-key tests over both
key sets instead of only the legacy one, so a future exact-match
"cleanup" fails a test rather than silently decoding four streams nobody
reads.
No behaviour change.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Pushed one commit onto this branch ( Context: #16 renames the tactile camera keys to follow lerobot-xense What was misleading was that the comment, the doc table and the
One scheduling note, unrelated to the content: |
Improves training data-loading throughput and removes periodic pipeline stalls.
Changes
in_order=False, avoiding head-of-line blocking.InfiniteSamplerto prevent iterator teardown and prefetch warm-up at epoch boundaries.DataConfig.tactile,TrainConfig.strict_batch_order), H100 training examples, regression tests, and benchmark documentation.Results
Controlled 400-step H100 training A/B:
next_batchwait: 7.83 s → 0.43 sSelective tactile decoding reduces single-sample
__getitem__latency from 262.4 ms to 153.3 ms (1.71x). It also reduced startup-to-first-batch time by 37.3 s, although it did not improve steady-state end-to-end throughput in the tested H100 configuration because decoding was not the remaining bottleneck.A separate 64,951-step production run confirmed that stalls at worker-rotation and epoch boundaries were eliminated. The remaining long waits occurred after checkpoint saves. The production comparison documented in this PR is cross-task and is therefore not presented as a controlled experiment — only the 400-step A/B above is.
Full write-up:
docs/data-pipeline-stalls.md.Test coverage
Regression tests in
src/openpi/training/data_loader_test.pycover:Review round
Addressed in
bc394fcandeb6d358:SelectiveVideoLeRobotDataset.decode_video_keysnow defaults toNone("decode everything") rather than an empty whitelist, so a construction site that forgets to set it degrades to plainLeRobotDatasetbehaviour instead of silently training on missing images.torchfloor to>=2.6, the release that addedDataLoader(in_order=...).ruffRUF043 failure in the new tests.docs/data-pipeline-stalls.html, which duplicated the.mdin the same directory.strict_batch_orderinconfigs/_examples/_FULL_REFERENCE.yaml.configs/_examples/.