Skip to content

Commit 333d368

Browse files
committed
always create the metadata file
1 parent 89b6460 commit 333d368

File tree

1 file changed

+3
-6
lines changed
  • browsergym/experiments/src/browsergym/experiments/benchmark/metadata

1 file changed

+3
-6
lines changed

browsergym/experiments/src/browsergym/experiments/benchmark/metadata/utils.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,10 @@
1313
from browsergym.experiments.loop import EnvArgs
1414

1515

16-
def make_webarena_verified_metadata_if_not_exists():
16+
def make_webarena_verified_metadata():
1717
"""
18-
Checks if the webarena_verified.csv file exists. If not, it creates it.
18+
Creates the webarena_verified.csv metadata file based on the original webarena.csv file and the webarena-verified.json file in the webarena-verified library.
1919
"""
20-
if os.path.exists(os.path.join(os.path.dirname(__file__), "webarena_verified.csv")):
21-
return
22-
2320
# Load the json file from the webarena-verified library
2421
data = json.loads(
2522
importlib.resources.files("webarena_verified")
@@ -118,7 +115,7 @@ def make_webarena_verified_metadata_if_not_exists():
118115

119116
def task_metadata(benchmark_name: str):
120117
if benchmark_name == "webarena_verified":
121-
make_webarena_verified_metadata_if_not_exists()
118+
make_webarena_verified_metadata()
122119

123120
return task_metadata_from_csv(
124121
io.StringIO(pkgutil.get_data(__name__, f"{benchmark_name}.csv").decode("utf-8"))

0 commit comments

Comments
 (0)