Closed tudor-berariu closed 1 year ago
Hi! Let me add a reviewer that can approve the pull request.
@pseudo-rnd-thoughts This pull request edits the task HTML files by exposing task parameters as global JavaScript variables. This does not change the task behavior so it should be safe to merge. (Our Python API does not do anything with these variables, though.)
Oops, we've made a mistake, we didn't mean to create the pull request here yet, but instead into our fork. Also, btw amazing job on maintaining the MiniWoB++ repo!
But given we did create the PR here, a bit of context. We have written policies by hand (using Playwright) to solve all the MiniWoB++ tasks by only interacting with the environment at pixel level (e.g. actions are Move(x, y)
, LeftClick
, EmitText("Hello")
etc.). An example:
You can use this to train an agent in a supervised fashion end-to-end or initialize policies with "behaviour cloning" for RL.
To do this, we found it easier to add the ground truth to JS variables for some tasks which we read from the env -- hence what's going on in this PR. If you are open to merging this upstream, we'd be very happy to clean up this PR a bit and resubmit it :bow:
@ppasupat Thanks for confirming, the PR is all your choice of what we do include, or not, etc, you know better about the project than I do
@mcobzarenco Thank you for the context. Since this PR is intended to be for a fork, would it be OK if we close the PR for now?
Adding ground truth to JS variables is a great idea though, and we would gladly accept an implementation. One possible improvement would be to make this exposed information uniform across all tasks. The Python API would also benefit from this (currently the fields
in the observation are extracted using regular expression, which is not ideal).
Add a few more target vars.