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): Improve output and debug logging of pytest evals
Reinier van der Leer738c8ffff0a5
diff --git a/benchmark/agbenchmark/challenges/builtin.py b/benchmark/agbenchmark/challenges/builtin.pyindex ecd9cf2b55..b93dc1140e 100644--- a/benchmark/agbenchmark/challenges/builtin.py+++ b/benchmark/agbenchmark/challenges/builtin.py@@ -339,8 +339,11 @@ class BuiltinChallenge(BaseChallenge):capture_output=True,text=True,)+ logger.debug(f"EXIT CODE: {result.returncode}")+ logger.debug(f"STDOUT: {result.stdout}")+ logger.debug(f"STDERR: {result.stderr}")if "error" in result.stderr or result.returncode != 0:- yield "pytest", f"Error: {result.stderr}\n"+ yield "pytest", f"Error: {result.stderr.strip() or result.stdout}\n"else:yield "pytest", f"Output: {result.stdout}\n"