FIX: Three Bugs in async E2B code sandbox #493
+16
−13
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.
The previous implementation and #484 on async E2B sandbox have three bugs.
First in this line,
verification_info
is actually a list. See the list comprehension right above.open-r1/src/open_r1/rewards.py
Line 373 in 9890a8d
Here also screenshot from pdb:

Fixed by collecting
languages
first and from then on passinglanguages: list[str]
around.Second bug is
language
was not passed torun_script
.open-r1/src/open_r1/rewards.py
Line 418 in 9890a8d
Even though it expects
language
.open-r1/src/open_r1/rewards.py
Line 430 in 9890a8d
Third bug: see comment below.
I also added more specific error handling, as exceptions of these three bugs were handle too generally.