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.
Allow change location of reports (#115)
merwanehamadi2704bcee5ef8
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 907c21267a..9d4769e760 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -64,7 +64,6 @@ jobs:if: success() || failure()tests:- if: github.event_name != 'pull_request' || matrix.cache-enabled == falsename: "${{ matrix.agent-name }} (Cache: ${{ matrix.cache-enabled }})"runs-on: ubuntu-latesttimeout-minutes: 10@@ -161,12 +160,12 @@ jobs:REQUESTS_CA_BUNDLE: /etc/ssl/certs/ca-certificates.crtHELICONE_CACHE_ENABLED: ${{ matrix.cache-enabled }}HELICONE_PROPERTY_AGENT: ${{ matrix.agent-name }}+ REPORT_LOCATION: ${{ matrix.cache-enabled == true && format('../../../benchmark_runs/{0}', matrix.agent-name) || '.' }}- name: Upload reportsif: always()uses: actions/upload-artifact@v3with:- name:- "${{ matrix.agent-name }} (Cache ${{ matrix.cache-enabled }})"- path: agent/${{ matrix.agent-name }}/agbenchmark+ name: ${{ matrix.agent-name }}+ path: benchmark_runs/${{ matrix.agent-name }}diff --git a/agbenchmark/utils.py b/agbenchmark/utils.pyindex 1174e89bbf..506c48847b 100644--- a/agbenchmark/utils.py+++ b/agbenchmark/utils.py@@ -1,5 +1,6 @@# radio charts, logs, helper functions for tests, anything else relevant.import glob+import osimport refrom datetime import datetimefrom pathlib import Path@@ -9,7 +10,10 @@ from agbenchmark.challenges.define_task_types import DIFFICULTY_MAP, DifficultyLdef calculate_info_test_path(benchmarks_folder_path: Path) -> str:- INFO_TESTS_PATH = benchmarks_folder_path / "reports"++ INFO_TESTS_PATH = (+ benchmarks_folder_path / os.getenv("REPORT_LOCATION", ".") / "reports"+ )if not INFO_TESTS_PATH.exists():INFO_TESTS_PATH.mkdir(parents=True, exist_ok=True)