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.

forcing AGENT_NAME to be defined from repo

Silen Naihin71e0c598d657
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a8a3fad112..32c74c15c4 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -93,10 +93,6 @@ jobs:
submodules: true
token: ${{ env.GH_TOKEN }}
- - name: List submodule files
- run: |
- ls -al agbenchmark/challenges
-
- name: Set up Python ${{ env.min-python-version }}
uses: actions/setup-python@v2
with:
@@ -112,11 +108,7 @@ jobs:
- name: Install dependencies
run: |
- python --version
- poetry --version
- poetry install --no-interaction -vvv
- poetry run agbenchmark start --mock
- poetry run agbenchmark start --mock --maintain
+ poetry install -vvv
poetry build
- name: Run regression tests
diff --git a/agbenchmark/start_benchmark.py b/agbenchmark/start_benchmark.py
index c5078408a3..d2bb2f6583 100644
--- a/agbenchmark/start_benchmark.py
+++ b/agbenchmark/start_benchmark.py
@@ -76,7 +76,11 @@ def start(
)
return 1
- print("CONFIG_PATH", CONFIG_PATH)
+ if os.path.join("Auto-GPT-Benchmarks") in str(HOME_DIRECTORY) and not AGENT_NAME:
+ print(
+ "If you are running from the Auto-GPT-Benchmarks repo, you must have AGENT_NAME defined."
+ )
+ return 1
if not os.path.exists(CONFIG_PATH) or os.stat(CONFIG_PATH).st_size == 0:
config = {}
@@ -84,6 +88,7 @@ def start(
config["workspace"] = click.prompt(
"Please enter a new workspace path",
default=os.path.join("workspace"),
+ show_default=True,
)
with open(CONFIG_PATH, "w") as f:
@@ -93,20 +98,20 @@ def start(
with open(CONFIG_PATH, "r") as f:
config = json.load(f)
- os.environ["MOCK_TEST"] = "True" if mock else "False"
+ print("Current configuration:")
+ for key, value in config.items():
+ print(f"{key}: {value}")
if not os.path.exists(REGRESSION_TESTS_PATH):
with open(REGRESSION_TESTS_PATH, "w"):
pass
+ os.environ["MOCK_TEST"] = "True" if mock else "False"
+
if not os.path.exists(INFO_TESTS_PATH):
with open(INFO_TESTS_PATH, "w"):
pass
- print("Current configuration:")
- for key, value in config.items():
- print(f"{key}: {value}")
-
pytest_args = ["-vs"]
if test:
print("Running specific test:", test)
diff --git a/agbenchmark/utils/utils.py b/agbenchmark/utils/utils.py
index d6359a8b29..07f0e57eb4 100644
--- a/agbenchmark/utils/utils.py
+++ b/agbenchmark/utils/utils.py
@@ -216,7 +216,6 @@ def calculate_dynamic_paths() -> tuple[Path, str, str, str]:
CONFIG_PATH, REGRESSION_TESTS_PATH, INFO_TESTS_PATH = assign_paths(
benchmarks_folder_path
)
-
else:
# otherwise the default is when home is an agent (running agbenchmark from agent/agent_repo)
# used when its just a pip install