feat: preflight verifiers for record and train, fix training subprocess env - #96
Open
pearlq12345 wants to merge 8 commits into
Open
feat: preflight verifiers for record and train, fix training subprocess env#96pearlq12345 wants to merge 8 commits into
pearlq12345 wants to merge 8 commits into
Conversation
added 8 commits
May 4, 2026 22:03
RecordPreflightVerifier — validates before spawning lerobot record:
- wrapper action is 'record'
- required dataset args present (repo_id, root, num_episodes, episode_time_s)
- num_episodes / episode_time_s within sane bounds
- fps in [1, 120]
- non-empty task string
- at least one follower arm; bimanual requires left+right
TrainPreflightVerifier — validates before dispatching lerobot-train:
- non-empty dataset_name
- policy_type in {act, diffusion, tdmpc, vqbet}
- steps in [1, 10_000_000]
- non-empty device
- warns (not blocks) if dataset path not yet local
EmbodiedService.start_recording() now runs RecordPreflightVerifier.
EmbodiedService.start_training() new method runs TrainPreflightVerifier
and replaces the raw service.train.train() call in the HTTP route.
Tests: 20 passed (test_record_train_preflight.py)
- Move _verify_train_preflight() before require_local_dataset() so bad params (empty name, unsupported policy_type, invalid steps) are rejected immediately without touching the filesystem - Add try/except RuntimeError in train_start route so ActionError surfaces as HTTP 400 instead of 500
- TrainPreflightVerifier now imports TRAIN_POLICY_TYPES from CommandBuilder instead of maintaining a separate hardcoded set, so smolvla/pi0/groot/etc are accepted without manual sync - doTrainStart catches API errors and writes them to trainJobMessage - TrainingCenterPage renders trainJobMessage as a red banner below the action buttons so preflight rejections are visible to the user
- Use list_local_datasets() instead of resolve_runtime_dataset() to find dataset by runtime name, avoiding the symlink path-traversal check that rejects valid datasets under symlinked directories - Call SubprocessExecutor directly instead of TrainSession.train() to avoid double dataset resolution - Catch ValueError in train route (not just RuntimeError) - Show trainJobMessage as red banner in TrainingCenterPage
Author
|
The one remaining test failure ( |
hzhe0083-source
pushed a commit
to Shiki42/RoboClaw
that referenced
this pull request
May 5, 2026
[codex] Polish UI responsive layout
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
RecordPreflightVerifier: validates record args before spawning LeRobot (repo_id, root, num_episodes, episode_time_s, fps, task, arm config)TrainPreflightVerifier: validates training args before spawning lerobot-train (dataset_name, policy_type, steps, device)CommandBuilder.train()using barelerobot-traincommand — now usessys.executable -m lerobot.scripts.lerobot_trainto respect active Python envTesting
tests/verification/test_record_train_preflight.py