fix(config): seed no-model refs for prepare-data#1745
Open
rodboev wants to merge 1 commit into
Open
Conversation
Signed-off-by: Rod Boev <rod.boev@gmail.com>
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
ng_prepare_datastill fails when the no-model parse path encounters additional response-model refs such asuser_modelorjudge_model, because onlypolicy_modelgets a dummy server config.This seeds missing referenced
responses_api_modelsserver blocks during the no-model parse path and leaves the existing dummy cleanup to handle populated real model configs.Closes #997
Root cause
GlobalConfigDictParserConfig.NO_MODEL_GLOBAL_CONFIG_DICTonly provides a dummypolicy_model. After the parser merges configs, server-ref validation checks referenced model-server names against top-level server instances. When a config referencesresponses_api_models/user_modeland no top-leveluser_modelexists, parsing raisesServerRefNotFoundError.The existing
dummy_modelcleanup only rewrites model-server blocks that already exist. It cannot synthesize the missing top-leveluser_modelorjudge_modelblock.Changes
responses_api_modelsserver blocks only when the no-model parse path is active.prepare_data()entry-path regression test.Scope
Validation
uv run pytest tests/unit_tests/test_global_config.py tests/unit_tests/test_train_data_utils.py -k "dummy_model or no_model_config_seeds_referenced_model_server_refs or prepare_data_no_model_config_seeds_non_policy_model_refs" -x -v- blocked before collection on Windows becauseuvloop==0.21.0does not support Windowsuv run pre-commit run --files nemo_gym/global_config.py tests/unit_tests/test_global_config.py tests/unit_tests/test_train_data_utils.py- not run becauseuv runis blocked by the same Windowsuvloopbuild limitationruff check --config pyproject.toml nemo_gym/global_config.py tests/unit_tests/test_global_config.py tests/unit_tests/test_train_data_utils.pyruff format --config pyproject.toml --check nemo_gym/global_config.py tests/unit_tests/test_global_config.py tests/unit_tests/test_train_data_utils.pyNotes
The new regression should fail on the current base with
ServerRefNotFoundErrorforresponses_api_models/'user_model', then pass after the parser seeds the missing dummy model-server block.