AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
fix(benchmark): Unbreak `-N`/`--attempts` option
Reinier van der Leerf9792ed7f351
diff --git a/benchmark/agbenchmark/challenges/builtin.py b/benchmark/agbenchmark/challenges/builtin.pyindex 30bd50f8a2..694d10184c 100644--- a/benchmark/agbenchmark/challenges/builtin.py+++ b/benchmark/agbenchmark/challenges/builtin.py@@ -158,7 +158,7 @@ class BuiltinChallenge(BaseChallenge):self,config: AgentBenchmarkConfig,request: pytest.FixtureRequest,- i_attempt: int = 0,+ i_attempt: int,) -> None:# if os.environ.get("HELICONE_API_KEY"):# from helicone.lock import HeliconeLockManagerdiff --git a/benchmark/agbenchmark/challenges/webarena.py b/benchmark/agbenchmark/challenges/webarena.pyindex d3a081e049..2e51ab2be1 100644--- a/benchmark/agbenchmark/challenges/webarena.py+++ b/benchmark/agbenchmark/challenges/webarena.py@@ -377,7 +377,7 @@ class WebArenaChallenge(BaseChallenge):self,config: AgentBenchmarkConfig,request: pytest.FixtureRequest,- i_attempt: int = 0,+ i_attempt: int,) -> None:if not self._spec.available:pytest.skip(self._spec.unavailable_reason)diff --git a/benchmark/agbenchmark/conftest.py b/benchmark/agbenchmark/conftest.pyindex 7e417a603d..cf40493b54 100644--- a/benchmark/agbenchmark/conftest.py+++ b/benchmark/agbenchmark/conftest.py@@ -216,8 +216,8 @@ def pytest_sessionfinish(session: pytest.Session) -> None:def pytest_generate_tests(metafunc: pytest.Metafunc):- if type(n := metafunc.config.getoption("-N")) is str:- metafunc.parametrize("i_attempt", range(int(n)))+ n = metafunc.config.getoption("-N")+ metafunc.parametrize("i_attempt", range(int(n)) if type(n) is str else [0])def pytest_collection_modifyitems(