fix(action): validate nano DROID policy SFT TOML against the schema (#138) - #139
Merged
Merged
Conversation
`examples/toml/sft_config/action_policy_droid_nano.toml` carried `[model.rectified_flow_training_config]` and `[dataloader_train.dataloader]` blocks that `SFTExperimentConfig` (`extra="forbid"`) does not model, so loading it via `--sft-toml` raised `ValidationError` (issue NVIDIA#138). The TOML had never validated against the schema; reference runs used the Hydra `experiment=` path, so the structured-TOML entry point was never exercised. Follow edge practice and keep these values in the registered recipe instead of the TOML: - set the inner dataloader scalars (batch_size/num_workers/prefetch_factor) to the reference values in `action_policy_droid_nano`; - drop both blocks from the TOML (`loss_scale=10` was already set in the recipe). Add a parametrized test that validates every `examples/toml/sft_config/*.toml` against the schema and builds its Hydra overrides. The existing `unittest` job in gpu-tests.yml runs the whole `cosmos_framework/` suite, so the new test is picked up automatically. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
fwd4
force-pushed
the
fix/nano-droid-policy-toml-schema
branch
from
July 28, 2026 06:49
5706456 to
0a5d8f4
Compare
lfengad
approved these changes
Jul 28, 2026
Dinghow
approved these changes
Jul 28, 2026
lfengad
enabled auto-merge (squash)
July 28, 2026 07:50
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.
Summary
The
action_policy_droid_nanopost-training config could not be loaded via the documented--sft-tomlentry point:examples/toml/sft_config/action_policy_droid_nano.tomlcarried[model.rectified_flow_training_config]and[dataloader_train.dataloader]blocks thatSFTExperimentConfig(extra="forbid") does not model, soload_experiment_from_tomlraisedValidationError. Addresses #138.Fix (mirrors the edge recipe)
Keep these values in the registered recipe instead of the TOML:
batch_size=16/num_workers=16/prefetch_factor=2, the reference values) inaction_policy_droid_nano.loss_scale=10was already set in the recipe).The TOML now contains only schema-registered blocks, so it validates with no schema change — consistent with how
action_policy_droid_edgealready works, and with i4 (which keepsloss_scale/dataloader in the experiment config).Test
TestExampleTomlConfigsinsft_config_test.pyis parametrized over everyexamples/toml/sft_config/*.toml, validating each againstSFTExperimentConfigand building its Hydra override list. The existingunittestjob ingpu-tests.ymlrunspytest cosmos_framework/, so the new test is picked up automatically (no new workflow needed).Verified locally: all 12 example TOMLs pass validation + override construction with the fix applied.
🤖 Generated with Claude Code