forked from Generality-Labs/inspect-evals-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Add agentic solvers [4/n] #7
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
c7d49be
Add agentic "tools" solver for LAB-Bench 2
iphan f911570
Refactor solvers.py into a solvers package
iphan beefea5
Add the agentic solver and sandbox environment
iphan 51ef4da
Wire the agentic solver into the task and registry
iphan 29287c6
Copy question files into the agentic sandbox
iphan 8538d42
update readme and add e2e test
iphan d9aa76f
Pin python deps in sandbox for reproducibility
iphan 15fb74c
Readme tweaks from code review
iphan ac77519
Log warning if no search api key is found for the agent
iphan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # Scientific Python stack for the agentic solver's sandboxed python/bash tools. | ||
| # Versions are pinned for reproducible builds. pydna constrains biopython, | ||
| # numpy, pandas, and scipy, so bump them as a set (re-resolve, don't pin | ||
| # individually). The base image is intentionally left unpinned: it must track | ||
| # the inspect tool-support protocol of the installed inspect_ai. | ||
| FROM aisiuk/inspect-tool-support | ||
|
|
||
| RUN pip install --no-cache-dir \ | ||
| biopython==1.87 \ | ||
| pydna==5.5.12 \ | ||
| primer3-py==2.3.0 \ | ||
| pandas==3.0.3 \ | ||
| numpy==2.4.6 \ | ||
| scipy==1.17.1 | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| """Solvers for the LAB-Bench 2 evaluation. | ||
|
|
||
| The reference benchmark runs each model in two configurations: `bare` (no tools, | ||
| single-turn) and an agentic configuration with provider-native tools. This package | ||
| groups the solver factories and the registry that maps a ``SolverType`` to them. | ||
| """ | ||
|
|
||
| from lab_bench_2.solvers.agent import agentic | ||
| from lab_bench_2.solvers.registry import ( | ||
| SOLVERS_BY_TYPE, | ||
| SolverType, | ||
| sandbox_for_solver, | ||
| solver_for_type, | ||
| ) | ||
| from lab_bench_2.solvers.sandbox_tools import sandbox_tools | ||
| from lab_bench_2.solvers.solvers import bare, native_tools, tools | ||
|
|
||
| __all__ = [ | ||
| "SOLVERS_BY_TYPE", | ||
| "SolverType", | ||
| "agentic", | ||
| "bare", | ||
| "native_tools", | ||
| "sandbox_for_solver", | ||
| "sandbox_tools", | ||
| "solver_for_type", | ||
| "tools", | ||
| ] |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the comment - this is useful.
Is the version of Inspect AI pinned (in the .toml right)? is it possible to pin to the corresponding docker image version and update when the Inspect AI version updates?
This is just a suggestion though - I don't image the aisiuk/inspect-tool-support image will change drastically
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dug into this and decided to keep the base image unpinned, because version-tracking isn't actually possible for the image: it is only published as
lateston Docker Hub, there are no per-version tags to pin to.inspect_ai is locked to an exact version in uv.lock, and Inspect version-checks the sandbox's tool-support at startup, so a protocol mismatch would surface clearly