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

Initial PR: Add gitignore and improve template detection #1482

Merged
merged 2 commits into from
Jan 31, 2024
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
3 changes: 3 additions & 0 deletions samples/tools/autogenbench/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
scenarios/*/Downloads
scenarios/*/Tasks
*/Results
18 changes: 12 additions & 6 deletions samples/tools/autogenbench/scenarios/GAIA/Scripts/init_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ def create_jsonl(name, tasks, files_dir, template):
"__FILE_NAME__": task["file_name"],
"__PROMPT__": task["Question"],
},
"expected_answer.txt": {"__EXPECTED_ANSWER__": task["Final answer"]},
"expected_answer.txt": {
"__EXPECTED_ANSWER__": task["Final answer"]
},
},
}

Expand All @@ -77,7 +79,9 @@ def main():
gaia_test_files = os.path.join(REPO_DIR, "2023", "test")

if not os.path.isdir(gaia_validation_files) or not os.path.isdir(gaia_test_files):
sys.exit(f"Error: '{REPO_DIR}' does not appear to be a copy of the GAIA repository.")
sys.exit(
f"Error: '{REPO_DIR}' does not appear to be a copy of the GAIA repository."
)

# Load the GAIA data
gaia_validation_tasks = [[], [], []]
Expand All @@ -97,10 +101,12 @@ def main():

gaia_test_tasks[data["Level"] - 1].append(data)

templates = {
"two_agents": os.path.join(TEMPLATES_DIR, "BasicTwoAgents"),
"soc": os.path.join(TEMPLATES_DIR, "SocietyOfMind"),
}
# list all directories in the Templates directory
# and populate a dictionary with the name and path
templates = {}
for entry in os.scandir(TEMPLATES_DIR):
if entry.is_dir():
templates[entry.name] = entry.path

# Add coding directories if needed (these are usually empty and left out of the repo)
for template in templates.values():
Expand Down
Loading