Repository navigation
Conversation
tool_calling keeps its probe, prompts, verifier, tool catalog and tests in its own folder, as the other built-in probes do: probe.py beside prompts.py and verifiers.py, assets/tool_calling/ with the catalog, its prompts and its README, and tests/probes/tool_calling/. The class declares that assets/ folder as its root. The sample_tools fixture is in tests/conftest.py, where the engine tests and the probe's tests both reach it. engine/assets/ holds a README saying the built-in probes keep their banks beside their code, and the docs list tool_calling with them. Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
The asset search path holds the deliberate overrides only: the runtime root, USERSIM_ASSET_PATH and USERSIM_ASSETS_DIR. After them each probe reads the root its class declares, so the package ships no shared assets folder. --assets-dir pins every probe to the folder it names, the same for every folder. A run that pins none records no asset folder in its config, its manifest and its stored rows, and simulate --inputs reads such rows from each probe's own assets. gen-assets, validate-assets and evaluate-assets default to the domain's own bank through shipped_assets_dir. BREAKING CHANGE: the package has no usersim/engine/assets/ folder and no packaged_assets_dir or default_assets_dir. Rows stored by an earlier release name that folder; store them again, or run them with --assets-dir. Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
The engine docs list tool_calling/test_probe.py, test_verifiers.py and test_catalog.py in the table of tests under tests/probes/, and the comment on the jsonschema dev dependency in pyproject.toml names tests/probes/tool_calling/test_catalog.py, where the catalog tests are. Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
This branch has not been deployed
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 changed and why
Every built-in probe keeps its assets beside its code, and a probe's assets resolve from the deliberate overrides, then the root its class declares. The package ships no shared assets folder.
Builds on #129.
tool_callingin one folder (first commit).tool_callingkeeps its probe, prompts, verifier, tool catalog and tests in its own folder, as the other built-in probes do:probe.pybesideprompts.pyandverifiers.py,assets/tool_calling/with the catalog, its prompts and its README, andtests/probes/tool_calling/. The class declares thatassets/folder as its root. Thesample_toolsfixture is intests/conftest.py, where the engine tests and the probe's tests both reach it.USERSIM_ASSET_PATHandUSERSIM_ASSETS_DIR), and after them each probe reads the root its class declares.--assets-dirpins every probe to the folder it names, the same for every folder. A run that pins none records no asset folder in its simulator config, its manifest and its stored rows, andsimulate --inputsreads such rows from each probe's own assets.gen-assets,validate-assetsandevaluate-assetsdefault to the domain's own bank throughshipped_assets_dir().architecture/assets.md,architecture/plugins.md,architecture/probes.mdand the engine docs describe the search this way, and01_simulate.ipynbreads each probe's own assets.Breaking change
usersim/engine/assets/folder, andusersim.engine.core._assetshas nopackaged_assets_dir()ordefault_assets_dir().--assets-dirrecordsassets_dir: nullin its simulator config, its manifest and the rows--materialize-inputsstores.--materialize-inputsname that release'susersim/engine/assets/folder, sosimulate --inputsrefuses them and says so. Store them again with this release, or run them with--assets-dirnaming a folder that holds a<probe>/folder for each of their probes.How it was verified
At each commit, on that commit's tree:
That is the first commit's tree. The second passes with 4675: it drops the tests of the shared folder and adds tests of the search path without it.
At the head:
An unpinned dry run reports where its assets come from, and a run pinned to an empty folder is refused before any model call (paths shortened):
make health-checkran against a custom provider config fortool_callinginen_GBand for the default probe,sov_ai_dynamicinja_JP. Both ended with✓ simulate, eval and report all completed, and every model's requests showfailed=0.usersim simulate, thenusersim eval --scorers auto, ran against the same config fortool_callinginen_GB, so thetool_usescorer read its judge prompt from the probe's folder in a process that does not import the probe: