aboutsummaryrefslogtreecommitdiff
path: root/benchmark
diff options
context:
space:
mode:
authorGravatar Reinier van der Leer <pwuts@agpt.co> 2024-02-16 18:43:37 +0100
committerGravatar Reinier van der Leer <pwuts@agpt.co> 2024-02-16 18:43:37 +0100
commitf9792ed7f351147b0994097e38debb485cc458a7 (patch)
tree97e7470f7826e2312561360f5cbb479669d7c19d /benchmark
parentRename autogpts-benchmark-nightly.yml to autogpts-benchmark.yml (diff)
downloadAuto-GPT-f9792ed7f351147b0994097e38debb485cc458a7.tar.gz
Auto-GPT-f9792ed7f351147b0994097e38debb485cc458a7.tar.bz2
Auto-GPT-f9792ed7f351147b0994097e38debb485cc458a7.zip
fix(benchmark): Unbreak `-N`/`--attempts` option
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/agbenchmark/challenges/builtin.py2
-rw-r--r--benchmark/agbenchmark/challenges/webarena.py2
-rw-r--r--benchmark/agbenchmark/conftest.py4
3 files changed, 4 insertions, 4 deletions
diff --git a/benchmark/agbenchmark/challenges/builtin.py b/benchmark/agbenchmark/challenges/builtin.py
index 30bd50f8a..694d10184 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 HeliconeLockManager
diff --git a/benchmark/agbenchmark/challenges/webarena.py b/benchmark/agbenchmark/challenges/webarena.py
index d3a081e04..2e51ab2be 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.py
index 7e417a603..cf40493b5 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(