@@ -19,7 +19,9 @@ def _get_repo(module):
1919 return Repo (Path (module .__file__ ).resolve ().parent , search_parent_directories = True )
2020
2121
22- def _get_benchmark_version (benchmark : bgym .Benchmark ) -> str :
22+ def _get_benchmark_version (
23+ benchmark : bgym .Benchmark , allow_bypass_benchmark_version : bool = False
24+ ) -> str :
2325 benchmark_name = benchmark .name
2426
2527 if hasattr (benchmark , "get_version" ):
@@ -42,7 +44,10 @@ def _get_benchmark_version(benchmark: bgym.Benchmark) -> str:
4244 elif benchmark_name .startswith ("assistantbench" ):
4345 return metadata .distribution ("browsergym.assistantbench" ).version
4446 else :
45- raise ValueError (f"Unknown benchmark { benchmark_name } " )
47+ if allow_bypass_benchmark_version :
48+ return "bypassed"
49+ else :
50+ raise ValueError (f"Unknown benchmark { benchmark_name } " )
4651
4752
4853def _get_git_username (repo : Repo ) -> str :
@@ -183,6 +188,7 @@ def get_reproducibility_info(
183188 "*inspect_results.ipynb" ,
184189 ),
185190 ignore_changes = False ,
191+ allow_bypass_benchmark_version = False ,
186192):
187193 """
188194 Retrieve a dict of information that could influence the reproducibility of an experiment.
@@ -205,7 +211,7 @@ def get_reproducibility_info(
205211 "benchmark" : benchmark .name ,
206212 "study_id" : study_id ,
207213 "comment" : comment ,
208- "benchmark_version" : _get_benchmark_version (benchmark ),
214+ "benchmark_version" : _get_benchmark_version (benchmark , allow_bypass_benchmark_version ),
209215 "date" : datetime .now ().strftime ("%Y-%m-%d_%H-%M-%S" ),
210216 "os" : f"{ platform .system ()} ({ platform .version ()} )" ,
211217 "python_version" : platform .python_version (),
0 commit comments