Skip to content

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.

linter and handling errs

Silen Naihinf4225f63bf5d
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 22e4f1b593..5144742f5f 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -13,6 +13,5 @@
black . --exclude test.py
isort .
mypy .
- autoflake --remove-all-unused-imports --recursive --ignore-init-module-imports --ignore-pass-after-docstring agbenchmark"
-agbenchmark/start_benchmark.py
+ autoflake --remove-all-unused-imports --recursive --ignore-init-module-imports --ignore-pass-after-docstring --in-place agbenchmark
```
diff --git a/agbenchmark/reports/processing/gen_combined_chart.py b/agbenchmark/reports/processing/gen_combined_chart.py
index 0cc96d91a0..784e8ff9e3 100644
--- a/agbenchmark/reports/processing/gen_combined_chart.py
+++ b/agbenchmark/reports/processing/gen_combined_chart.py
@@ -21,8 +21,6 @@ def generate_combined_chart() -> None:
categories = all_agent_categories(reports_data)
- print("Agent categories:", categories)
-
# Count the number of directories in this directory
num_dirs = len([f for f in combined_charts_folder.iterdir() if f.is_dir()])
diff --git a/agbenchmark/reports/processing/process_report.py b/agbenchmark/reports/processing/process_report.py
index ac8729af69..72b5a5c43d 100644
--- a/agbenchmark/reports/processing/process_report.py
+++ b/agbenchmark/reports/processing/process_report.py
@@ -1,7 +1,7 @@
import json
import os
from pathlib import Path
-from typing import Any, Optional
+from typing import Any
from agbenchmark.reports.processing.get_files import (
get_latest_report_from_agent_directories,
@@ -41,7 +41,7 @@ def get_agent_category(report: Report) -> dict[str, Any]:
categories.setdefault(category, 0)
if data.metrics.success:
num_dif = STRING_DIFFICULTY_MAP[data.metrics.difficulty]
- if num_dif > categories.setdefault(category, 0):
+ if num_dif > categories[category]:
categories[category] = num_dif
for _, test_data in report.tests.items():
@@ -59,6 +59,8 @@ def all_agent_categories(reports_data: dict[str, Any]) -> dict[str, Any]:
for name, report in reports_data.items():
categories = get_agent_category(report)
- all_categories[name] = categories
+ if categories: # only add to all_categories if categories is not empty
+ print(f"Adding {name}: {categories}")
+ all_categories[name] = categories
return all_categories