Skip to content

Commit

Permalink
add reports, consolidate, update benchmark files
Browse files Browse the repository at this point in the history
  • Loading branch information
SilenNaihin committed Jul 11, 2023
1 parent a1e4a9f commit c52b14b
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 16 deletions.
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.

0 comments on commit c52b14b

Please sign in to comment.