Skip to content

Add custom section support to SFT TOML configuration#57

Open
main-voice wants to merge 9 commits into
NVIDIA:mainfrom
main-voice:feat/support-custom-config-fields
Open

Add custom section support to SFT TOML configuration#57
main-voice wants to merge 9 commits into
NVIDIA:mainfrom
main-voice:feat/support-custom-config-fields

Conversation

@main-voice

Copy link
Copy Markdown

No description provided.

Signed-off-by: Alex Peng <haopeng@nvidia.com>
Comment thread cosmos_framework/configs/toml_config/sft_config.py Outdated
dataloader_train: object = None


class TestCustomInterpolationAndAccess:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test here could put into cosmos_framework/ and make this test in the same format with the other *test.py in cosmos_framework/ such as inference/prompt_upsampling_test.py? to make sure the unittest job in the current ci tests could automatically grep and run it?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, thanks to clarify the tests structure

Updated the `load_experiment_from_toml` function to utilize `load_config` with a `pre_override` hook for injecting the `[custom]` section into the config before applying overrides. This ensures that custom configurations are part of the OmegaConf tree resolved by Hydra. Additionally, modified the `load_config` and `_load_py_config` functions to accept the `pre_override` parameter for enhanced configurability.

Documentation for SFT configuration has been updated to reflect these changes.
Signed-off-by: Alex Peng <haopeng@nvidia.com>
@main-voice main-voice marked this pull request as ready for review June 25, 2026 08:01
@foreverlms foreverlms requested a review from yy-code-nv June 25, 2026 08:40
Comment thread cosmos_framework/configs/base/config.py Outdated
yy-code-nv
yy-code-nv previously approved these changes Jun 26, 2026
Comment thread docs/sft_config.md Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants