Skip to content

[Tests] Use default config from config YAML in tests#392

Merged
SumanthRH merged 13 commits intoNovaSky-AI:mainfrom
SumanthRH:get-defaults-config
Oct 6, 2025
Merged

[Tests] Use default config from config YAML in tests#392
SumanthRH merged 13 commits intoNovaSky-AI:mainfrom
SumanthRH:get-defaults-config

Conversation

@SumanthRH
Copy link
Copy Markdown
Member

What does this PR do?

Cleans up some tests to use the default config from the config YAML rather that using mocks or creating new OmegaConf object with all keys specified. This will make the tests more maintainable as we add more config parameters and will also help catch issues with the default config values.

There are probably some more places where the replacement can be made, but this is a start.

Signed-off-by: SumanthRH <sumanthrh99@gmail.com>
x
Signed-off-by: SumanthRH <sumanthrh99@gmail.com>
x
Signed-off-by: SumanthRH <sumanthrh99@gmail.com>
x
Signed-off-by: SumanthRH <sumanthrh99@gmail.com>
x
Signed-off-by: SumanthRH <sumanthrh99@gmail.com>
x
Signed-off-by: SumanthRH <sumanthrh99@gmail.com>
x
Signed-off-by: SumanthRH <sumanthrh99@gmail.com>
x
Signed-off-by: SumanthRH <sumanthrh99@gmail.com>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request is a good initiative to refactor tests to use a default configuration from a YAML file, which enhances maintainability. The changes are generally well-aligned with this goal. However, I've identified a couple of critical issues that will prevent the tests from running correctly. The new get_default_config utility function misuses Hydra's API, which will lead to configuration loading failures. Additionally, a test helper function in tests/cpu/util.py has a bug where it returns None instead of a configuration object. I've provided code suggestions to fix these critical problems. I've also included a medium-severity comment to help complete a TODO for cleaning up redundant configuration overrides, further improving the code's clarity.

x
Signed-off-by: SumanthRH <sumanthrh99@gmail.com>
Signed-off-by: SumanthRH <sumanthrh99@gmail.com>
@SumanthRH SumanthRH requested a review from erictang000 October 5, 2025 01:07
x
Signed-off-by: SumanthRH <sumanthrh99@gmail.com>
Signed-off-by: SumanthRH <sumanthrh99@gmail.com>
Signed-off-by: SumanthRH <sumanthrh99@gmail.com>
Copy link
Copy Markdown
Collaborator

@erictang000 erictang000 left a comment

Choose a reason for hiding this comment

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

lgtm, assuming you ran the tests and everything is passing, thanks!

@SumanthRH
Copy link
Copy Markdown
Member Author

Have confirmed that gpu tests also pass for tests/gpu/gpu_ci/skyrl_gym_generator.py, rest should be unaffected

@SumanthRH SumanthRH merged commit 6e4c249 into NovaSky-AI:main Oct 6, 2025
3 checks passed
li-boxuan pushed a commit to li-boxuan/SkyRL that referenced this pull request Nov 23, 2025
# What does this PR do?

Cleans up some tests to use the default config from the config YAML
rather that using mocks or creating new OmegaConf object with all keys
specified. This will make the tests more maintainable as we add more
config parameters and will also help catch issues with the default
config values.

There are probably some more places where the replacement can be made,
but this is a start.

---------

Signed-off-by: SumanthRH <sumanthrh99@gmail.com>
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.

2 participants