Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reverting workarena.l1 back to original seed sampling #198

Merged
merged 2 commits into from
Oct 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions browsergym/experiments/src/browsergym/experiments/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,13 +279,13 @@ def task_list_from_metadata(metadata: pd.DataFrame, filter: dict[str, str] = {})
"workarena_l1": lambda: Benchmark(
name="workarena_l1",
high_level_action_set_args=DEFAULT_HIGHLEVEL_ACTION_SET_ARGS["workarena_l1"],
env_args_list=_make_env_args_list_from_repeat_tasks(
task_list=task_list_from_metadata(
metadata=task_metadata("workarena"), filter={"level": "l1"}
),
env_args_list=_make_env_args_list_from_workarena_curriculum(
level="l1",
task_category_filter=None,
meta_seed=42, # meta seed for evaluation curriculum
max_steps=15,
n_repeats=10,
seeds_rng=np.random.RandomState(42),
curriculum_type="agent",
seeds_l1=10,
),
task_metadata=task_metadata("workarena"),
),
Expand Down Expand Up @@ -330,16 +330,17 @@ def task_list_from_metadata(metadata: pd.DataFrame, filter: dict[str, str] = {})


def _make_env_args_list_from_workarena_curriculum(
level: Literal["l2", "l3"],
level: Literal["l1", "l2", "l3"],
task_category_filter: str,
meta_seed: int,
max_steps: int,
curriculum_type: Literal["human", "agent"],
seeds_l1: int = 10,
):
"""
Returns a WorkArena predefined task curriculum (e.g., task and seed combination).
"""
assert level in ("l2", "l3")
assert level in ("l1", "l2", "l3")
assert curriculum_type in ("human", "agent")

env_args_list = []
Expand All @@ -350,6 +351,7 @@ def _make_env_args_list_from_workarena_curriculum(
filter=f"{level}.{task_category_filter}" if task_category_filter else level,
meta_seed=meta_seed,
is_agent_curriculum=(curriculum_type == "agent"),
n_seed_l1=seeds_l1,
)

for task, seed in all_task_tuples:
Expand Down