fix:gaia dataset file attach issue and evaluation script format support#25
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR addresses file attachment formatting for the GAIA dataset and enhances the evaluation scripts’ configuration and environment handling.
- Added
visual_qa_tool_factoryto the tool maps. - Enabled
.envloading, string-label wrapping, and increased concurrency in the LLM evaluation script. - Updated evaluation runner script for the GAIA dataset.
- Fixed prompt formatting in GAIA batch builder.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/l0/traj_sampler/nb_agent_sampler/tool_specs.py | Added visual_qa_tool_factory to TOOL_FACTORY_MAP and enabled in TOOL_SPECS_MAP |
| evaluation/nb_agent_eval/simpleqa_metrics.py | Loaded environment from .env, wrapped labels when a string, and bumped --workers default to 64 |
| evaluation/nb_agent_eval/run_eval.sh | Switched datasets to GAIA and updated config path |
| evaluation/nb_agent_eval/eval_datasets/gaia.py | Applied .format(file_path=…) to the file-attach prompt |
Comments suppressed due to low confidence (1)
evaluation/nb_agent_eval/simpleqa_metrics.py:257
os.getenvis used here butosis not imported. Addimport osat the top to avoid a NameError.
client = openai.OpenAI(base_url=os.getenv("OPENAI_API_BASE"), api_key=os.getenv("OPENAI_API_KEY"))
Comment on lines
+18
to
+20
| from typing import Any | ||
|
|
||
| TOOL_FACTORY_MAP: dict[str, str] = {"qa": {"web_search_tool_factory", "jina_reader_tool_factory"}, "math": {}} | ||
| TOOL_FACTORY_MAP: dict[str, str] = {"qa": {"web_search_tool_factory", "jina_reader_tool_factory", "visual_qa_tool_factory"}, "math": {}} |
There was a problem hiding this comment.
The type annotation dict[str, str] is incorrect since the values are sets of strings. Consider using dict[str, set[str]] or Mapping[str, Set[str]] for accuracy.
| --datasets bamboogle musique simpleqa hotpotqa \ | ||
| --config_path /root/AgentRL/evaluation/nb_agent_eval/config/sampler_config_direct.yaml No newline at end of file | ||
| --datasets gaia \ | ||
| --config_path /root/l0/evaluation/nb_agent_eval/config/sampler_config_claude.yaml No newline at end of file |
There was a problem hiding this comment.
[nitpick] Using hardcoded absolute paths reduces portability—consider switching to relative paths or environment variables for the project root.
Suggested change
| --config_path /root/l0/evaluation/nb_agent_eval/config/sampler_config_claude.yaml | |
| --config_path "${PROJECT_ROOT}/evaluation/nb_agent_eval/config/sampler_config_claude.yaml" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What did you do
fix gaia dataset file attach issue and fix metric computing script format issue
New test cases
None
Test results
Other comments
None