fix(rlaif): accept preset reward_prompt template names - #6192
fix(rlaif): accept preset reward_prompt template names#6192rsareddy0329 wants to merge 6 commits into
Conversation
|
Claude finished @rsareddy0329's task in 1m 11s —— View job Code Review:
|
| model="meta-llama/Llama-2-7b-hf", | ||
| model_package_group="my-rlaif-models", | ||
| reward_model_id="reward-model-id", | ||
| reward_prompt="Rate the helpfulness of this response on a scale of 1-10" |
There was a problem hiding this comment.
Do we still accept inline prompt?
There was a problem hiding this comment.
No, we do not accept inline prompt currently as well, this input raises an error.
Correcting this incorrect example previously given in doc strings.
Issue #, if available:
reward_promptdid not accept preset template names via the Python SDK. Passing "summarize.jinja", "summarize", or any plain string (including the example from the SDK docs, "Rate the helpfulness of this response on a scale of 1-10") caused the SDK to treat the value as a HubContent name and call DescribeHubContent, failing with a validation error.Only strings with an exact "Builtin" prefix were routed to preset resolution; everything else fell through to a HubContent lookup.
Description of changes:
Resolve preset template names directly against the recipe's judge_prompt_template enum (which is already loaded in memory as hyperparameters._specs — no API
call), matching RLVR's preset behavior. New resolution order:
Details:
"summarize", "summarize.jinja", and enum values like /opt/ml/code/verl/summarize.jinja all normalize to summarize.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.