-
Notifications
You must be signed in to change notification settings - Fork 504
stop rollouts on incomplete responses (no content or tools) #948
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 |
|---|---|---|
|
|
@@ -33,6 +33,9 @@ __pycache__/ | |
|
|
||
| # libraries | ||
| /prime-rl | ||
| /packages/tasksets | ||
| /packages/harnesses | ||
|
|
||
|
|
||
| # outputs | ||
| wandb/ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -260,7 +260,10 @@ async def read_section(section_id: str) -> str: | |
| ) | ||
|
|
||
| async def judge_reward_func(judge, prompt, completion, answer, state) -> float: | ||
| judge_response = await judge(prompt, completion, answer, state) | ||
| cleaned_completion = [ | ||
| {x["role"]: x["content"].split("</think>")[-1] for x in completion} | ||
| ] | ||
|
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. Dict comprehension creates wrong message structure for judgeHigh Severity The dict comprehension |
||
| judge_response = await judge(prompt, cleaned_completion, answer, state) | ||
| if "yes" in judge_response.lower(): | ||
| return 1.0 | ||
| else: | ||
|
|
||


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.
Split on None content causes AttributeError
Medium Severity
AssistantMessage.contentis typed asMessageContent | Noneand defaults toNonefor tool-call-only messages. The expressionx["content"].split("</think>")will raise anAttributeErrorwhencontentisNone. In a multi-turn tool-use environment like wiki_search, assistant messages with onlytool_callsand nocontentare common. The error is silently caught by_call_individual_reward_func, returning a reward of0.0, which silently corrupts training signal.