Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gasse committed Oct 23, 2024
1 parent a164f12 commit 77b16cc
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions browsergym/core/src/browsergym/core/action/highlevel.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,23 @@ class HighLevelAction:
class HighLevelActionSet(AbstractActionSet):

# static class variables
ActionSubset = typing.Literal["chat", "infeas", "bid", "coord", "nav", "tab", "custom"]
ActionSubset = typing.Literal[
"chat",
"infeas",
"bid",
"coord",
"nav",
"tab",
"miniwob_all",
"miniwob_shi17",
"miniwob_liu18",
"miniwob_humphreys22",
"webarena",
"visualwebarena",
"workarena",
"workarena++",
"custom",
]
DemoMode = typing.Literal["off", "default", "all_blue", "only_visible_elements"]

def __init__(
Expand Down Expand Up @@ -441,4 +457,6 @@ def to_python_code(self, action):

# consistency checks
assert "custom" not in ACTION_SUBSETS
assert set(typing.get_args(HighLevelActionSet.ActionSubset)) == set(ACTION_SUBSETS.keys())
assert set(typing.get_args(HighLevelActionSet.ActionSubset)) == set(
list(ACTION_SUBSETS.keys()) + ["custom"]
)

0 comments on commit 77b16cc

Please sign in to comment.