This PR introduces a simple compatibility layer for exporting traces of the BrowserGym experiments in a format compatible with the Tapes of the TapeAgents framework.
What does it do:
convert a single trace of the experiment into a single Tape
decomposes each StepInfo step of the experiment into 3 steps of the tape agents: observation, thought, and action.
attempts to preserve as much metadata as possible for the step and for the whole trace.
parses action in the simplest possible way as a string with a single Python function call
if the think field is present in the agent info and not empty - it creates the thought step of the tape from it.
method to save the tape in json format
The MVP is ready but not yet tested.
Next steps in this PR:
test conversion over the real traces
collect feedback from the BrowserGym team
test tape loading on the TapeAgents side and rendering it with the tape browser
I've simplified this PR down to <100 lines of changes in a single file and added support of tape_segments inside the agent_info, which could be produced by TapeAgent in the AgentLab.
This PR introduces a simple compatibility layer for exporting traces of the BrowserGym experiments in a format compatible with the Tapes of the TapeAgents framework. What does it do:
think
field is present in the agent info and not empty - it creates the thought step of the tape from it.The MVP is ready but not yet tested.
Next steps in this PR:
cc @recursix.