Support JSON string parsing of teacher_model_init_kwargs in MiniLLMConfig#5259
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| Whether to apply length normalization to the rewards. | ||
| """ | ||
|
|
||
| _VALID_DICT_FIELDS = TrainingArguments._VALID_DICT_FIELDS + ["teacher_model_init_kwargs"] |
There was a problem hiding this comment.
Override drops inherited model_init_kwargs from valid dict fields
High Severity
_VALID_DICT_FIELDS is based on TrainingArguments._VALID_DICT_FIELDS instead of GRPOConfig._VALID_DICT_FIELDS. Since GRPOConfig adds "model_init_kwargs" to its _VALID_DICT_FIELDS, this override silently drops it. Before this PR, MiniLLMConfig inherited GRPOConfig._VALID_DICT_FIELDS (which included "model_init_kwargs"); after this PR, JSON string parsing of model_init_kwargs will no longer work, which is a regression.
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |


Support JSON string parsing of teacher_model_init_kwargs in MiniLLMConfig
This PR is required for:
This PR makes change the
MiniLLMConfigclass, extending the set of valid dictionary fields to includeteacher_model_init_kwargsfor improved configuration handling. Otherwise,TrainingArguments.__post_init__won't parse the JSON string into a dictteacher_model_init_kwargsto the_VALID_DICT_FIELDSlist inMiniLLMConfig, enabling its use in dictionary-based configuration workflows.Note
Low Risk
Single-line config metadata change limited to argument parsing/validation; low chance of behavioral impact beyond enabling the previously-ignored field.
Overview
MiniLLMConfignow extendsTrainingArguments._VALID_DICT_FIELDSto includeteacher_model_init_kwargs, enabling dictionary/JSON-string configuration of teacher model init kwargs to be accepted and parsed duringTrainingArguments.__post_init__.Written by Cursor Bugbot for commit 77013dc. This will update automatically on new commits. Configure here.