-
Notifications
You must be signed in to change notification settings - Fork 248
feat: enforce monotonicity config option #1840
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -330,6 +330,8 @@ def _setup_vllm_openai_api_server(self, app: FastAPI) -> FastAPI: | |||||
| openai_serving_models_kwargs["model_config"] = model_config | ||||||
| openai_serving_models = OpenAIServingModels(**openai_serving_models_kwargs) | ||||||
|
|
||||||
| enforce_monotonicity = self.cfg["vllm_cfg"].get("enforce_monotonicity", True) | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Avoid code-side default; rely on YAML for Using ✅ Suggested change- enforce_monotonicity = self.cfg["vllm_cfg"].get("enforce_monotonicity", True)
+ enforce_monotonicity = self.cfg["vllm_cfg"]["enforce_monotonicity"]As per coding guidelines, "YAML is the single source of truth for configuration defaults. Do not set non-None defaults in code for configuration values". 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
|
|
||||||
| class NeMoRLOpenAIChatRequestMixin: | ||||||
| def model_post_init(self, context): | ||||||
| # NeMo-Gym specific processing. This is just how NeMo-Gym returns the extra token information. | ||||||
|
|
@@ -384,6 +386,9 @@ async def _preprocess_chat( | |||||
| add_special_tokens, | ||||||
| ) | ||||||
|
|
||||||
| if not enforce_monotonicity: | ||||||
| return res | ||||||
|
|
||||||
| if request.required_prefix_token_ids is None: | ||||||
| return res | ||||||
|
|
||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: NVIDIA-NeMo/RL
Length of output: 40
🏁 Script executed:
Repository: NVIDIA-NeMo/RL
Length of output: 856
🏁 Script executed:
Repository: NVIDIA-NeMo/RL
Length of output: 3068
Add
enforce_monotonicityto exemplar YAMLs and document valid values and recommended default.The new config key is missing from exemplar YAML files under
examples/configs/and its documentation is incomplete. Per coding guidelines, new TypedDict config keys must document purpose, valid values/types, and recommended default, and this default must be reflected in exemplar YAMLs.Update the field comment to specify valid values (True/False) and recommended default, then add the key to relevant exemplar YAML files (e.g.,
grpo_math_*.yaml,dpo.yaml) with the recommended value.🤖 Prompt for AI Agents