Merged
Conversation
Collaborator
Author
|
This also includes another attempt of async environment (since the previous asyncio implementation was not compatible with math_verify) but this still gives errors when called with the LLM, e.g uncomment last test and run Maybe we should look into math_verify and see if we can make it work though since even when using with the standard SyncVectorEnv there are errors when MathEnv calls math_verify, e.g. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changes: (Sorry they're all in one pull request!)
TrackingEnvWrapperfor tracking episode metrics eg. env step, cumulative reward, num call tools, etc (Useful for debugging e.g. see gem/eval/eval.py)Refactored observation wrapper and added one that concatenates both obs and action but without the chat template. (This matches the ToRL format)
Edited python tool
Logic: Finds the first complete python call (if possible). Instead of the whole action being appended to the history, the python tool returns
parsed actionwhich is the action truncated at the end of the tool call and only this is added to the observation history.Traceback: Added option
include_tracebackto control whether the python tool returns the traceback in errors. Default = False which aligns with ToRL format.These changes above improve eval: ToRL and VerlTool models now both get 75% (eg.
python -m eval.eval --env_name eval:MATH500 --model_name GAIR/ToRL-1.5B --num_episodes 20 --batch_size 5 --wrappers "'python_tool,concat_with_action,episode_tracking'")