Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add reports, consolidate, update benchmark files #2

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions benchmarks.py → agbenchmark/benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,20 @@

def run_specific_agent(task: str) -> Tuple[str, int]:
# Construct the command
command = ['python', 'main_no_modal.py', task]
command = ["python", "main_no_modal.py", task]
subprocess.run(command, text=True)


def execute_generated_files():
# Navigate to generated directory
os.chdir('generated')
os.chdir("generated")

# Iterate over every .txt file in the directory
for file_name in glob.glob('*.txt'):
with open(file_name, 'r') as file:
for file_name in glob.glob("../*.txt"):
with open(file_name, "r") as file:
python_code = file.read()
python_code = python_code.replace('```python', '')
python_code = python_code.replace('```', '')
python_code = python_code.replace("```python", "")
python_code = python_code.replace("```", "")
# Execute the code in the .txt file
exec(python_code)

Expand Down
5 changes: 5 additions & 0 deletions agbenchmark/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"workspace": "generated",
"entry_path": "agbenchmark/benchmarks.py",
"cutoff": 60
}
3 changes: 2 additions & 1 deletion regression_tests.json → agbenchmark/regression_tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"TestWriteFile": {
"difficulty": "basic",
"dependencies": [],
"test": "agbenchmark/tests/basic_abilities/write_file/write_file_test.py"
"test": "agbenchmark/challenges/interface/write_file",
"success": true
}
}
18 changes: 18 additions & 0 deletions agbenchmark/reports/1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"command": "agbenchmark start --test TestWriteFile --mock",
"completion_time": "2023-07-10-21:19",
"time_elapsed": "8.34 seconds",
"tests": {
"TestWriteFile": {
"difficulty": "basic",
"dependencies": [],
"test": "agbenchmark/challenges/interface/write_file",
"success": true
}
},
"config": {
"workspace": "generated",
"entry_path": "agbenchmark/benchmarks.py",
"cutoff": 60
}
}
6 changes: 0 additions & 6 deletions config.json

This file was deleted.

3 changes: 0 additions & 3 deletions generated/.gitkeep

This file was deleted.