Repository navigation
Conversation
`python -m holosoma.run_sim --config run.yaml` expands a versioned document into the same CLI tokens a user would type: `arguments` groups become `<group>:<preset>`, keyed mappings become `<family>.<key>:<preset>`, and `overrides` become `--<dotted.path> <value>` flags. `backend` selects the simulator. Command-line tokens take precedence: a group the CLI selects replaces the document's, and repeated flags take the last value. Group selections are emitted before flags so tyro sees each subcommand before the flags inside it. A document may be embedded in a larger file, either under a `holosoma_sim` key (picked up automatically when the root has no `version`) or anywhere selected with `--config-path a.b`. Only `version`, `backend` and `arguments` are accepted, so settings for other tools live beside the document, not in it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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
python -m holosoma.run_sim --config run.yamlreads its arguments from a versioned YAML/JSON document instead of a long command line:--import-filework unchanged.holosoma_simkey (picked up automatically when the root has noversion), or anywhere via--config-path a.b.version,backendandargumentsare accepted. Settings for other tools (container, middleware, display) go beside the document rather than inside it, and an unknown key is an error that names it.Docs:
docs/run-sim-config-files.md.Scope
Only
run_sim.train_agent/replayneed their rootexp:token first, andeval_agentpre-parses its args with twotyro.clipasses, so supporting those would need more than this expansion step. That can follow if someone needs it.Testing
holosoma/utils/tests/test_config_document.py: a document (root, embedded,--config-path) parses to the sameRunSimConfigas the equivalent CLI; CLI precedence for groups and flags; rejection of old versions, foreign fields, andbackendtogether witharguments.simulator.python -m holosoma.run_sim --configon a headless MuJoCo G1 document starts and runs at ~1.0x real time.pre-commit runon the changed files andmypy .pass.🤖 Generated with Claude Code