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 home_path, local mini-agi run works (#64)
Silen Naihinbfd0d5c826b3
diff --git a/agbenchmark/agent_interface.py b/agbenchmark/agent_interface.pyindex 4d74aac736..8e9e5a14ca 100644--- a/agbenchmark/agent_interface.py+++ b/agbenchmark/agent_interface.py@@ -33,11 +33,10 @@ def run_agent()# Get the current working directory- cwd = os.getcwd()+ cwd = os.path.join(os.getcwd(), config["home_path"])# Add current directory to Python's import pathsys.path.append(cwd)- sys.path.append(os.path.join(cwd, config["home_path"]))command = [sys.executable, config["entry_path"], str(task)]process = subprocess.Popen(@@ -67,6 +66,7 @@ def run_agent(print("The Python function has exceeded the time limit and was terminated.")+ # Terminate the process groupprocess.terminate()breakdiff --git a/agbenchmark/start_benchmark.py b/agbenchmark/start_benchmark.pyindex 9c7b8e8dab..295bbf4bf9 100644--- a/agbenchmark/start_benchmark.py+++ b/agbenchmark/start_benchmark.py@@ -57,11 +57,6 @@ def start(category: str, maintain: bool, mock: bool) -> int:set_key(".env", "MOCK_TEST", "True" if mock else "False")- # create workspace directory if it doesn't exist- workspace_path = os.path.abspath(config["workspace"])- if not os.path.exists(workspace_path):- os.makedirs(workspace_path, exist_ok=True)-if not os.path.exists(REGRESSION_TESTS_PATH):with open(REGRESSION_TESTS_PATH, "a"):passdiff --git a/config.json b/config.jsonindex ba2ec0b80b..378e69025d 100644--- a/config.json+++ b/config.json@@ -1,6 +1,6 @@{- "workspace": "projects/my-new-project/workspace",+ "workspace": "${os.path.join(Path.home(), 'miniagi')}","entry_path": "benchmarks.py",- "home_path": "",+ "home_path": "agent/mini-agi/","cutoff": 60}diff --git a/pyproject.toml b/pyproject.tomlindex 7e95969aff..e0d579cab8 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -38,6 +38,7 @@ markers = ["retrieval","regression","basic",+ "memory"][tool.poetry.scripts]