BrowserGym
BrowserGym copied to clipboard
Allowing custom task for WebArena
Right now, it allows passing an id during __init__:
https://github.com/ServiceNow/BrowserGym/blob/04bd94487be21c399a7c78cbb4df505e30d2fbb9/webarena/src/browsergym/webarena/task.py#L23-L85
We could add another parameter task_configs which is of type List[Union[dict, str]], for example:
GenericWebArenaTask(task_configs=[{...}, {...}], ...)
where each dict would be something like this one, but customized: https://github.com/web-arena-x/webarena/blob/main/config_files/examples/2.json
Behind the scene, if task_configs dictionary/json-compatible string was passed, then the setup would automatically switch to this custom task instead of original test splits:
https://github.com/ServiceNow/BrowserGym/blob/04bd94487be21c399a7c78cbb4df505e30d2fbb9/webarena/src/browsergym/webarena/task.py#L87-L99