Repository navigation
Conversation
A built-in kept in its own folder declares usersim/engine/probes/<label>/assets/ as its assets_root. Until its class registers, the asset lookup takes that folder as the declared root when it holds the probe's folder, so a prompt read while the probe's module loads, as general_educational and general_open_ended read theirs, and a scorer in a process that never imports the probe reach the probe's assets. A test reads general_educational's seeds and general_open_ended's prompts in a fresh process with no probe registered. Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
The probe module is probes/sov_ai_facts/probe.py, beside its bank loader bank.py, its scorer scorer.py and its banks in assets/sov_ai_facts/, the folder the class names as its assets_root. Its tests are in tests/probes/sov_ai_facts/. The label, the scorer name, the banks, the stored columns and the cache the probe and its scorer share are unchanged. DEFAULT_SCORER_MODULES, the capability source references and the docs name the new modules, and the shared-code label allowances list neither the bank loader nor the scorer, which sit under engine/probes/. Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
The probe module is probes/sov_ai_dynamic/probe.py, beside its scorer, its banks in assets/sov_ai_dynamic/, and taxonomy.py, which names the probe's taxonomy files: default_probing_taxonomy_path, probing_taxonomy_path_for and load_probing_taxonomy_for_locale. The taxonomy format, its validator, select_category and the cache stay in core/probing_taxonomy.py, which financial_services also uses and which names no probe. Its tests are in tests/probes/sov_ai_dynamic/, including those of its taxonomy files and of every shipped taxonomy; the format's tests stay in tests/engine/core/test_probing_taxonomy.py. The label, the scorer name, the banks and the stored columns are unchanged. Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
The probe module is probes/sov_ai_multilingual_parity/probe.py, beside its bank loader bank.py, its scorer scorer.py and its bank in assets/sov_ai_multilingual_parity/, the folder the class names as its assets_root. Its tests are in tests/probes/sov_ai_multilingual_parity/. The label, the scorer name, the bank, the stored columns and the cache the probe and its scorer share are unchanged. Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
The test template, the probe template README and the authoring guide's worked example copy the test template to tests/probes/<label>/test_probe.py beside an __init__.py, the layout the sov_ai probes use. The engine README says a probe kept in its own folder has its tests there, and Step 2 of the guide names the sov_ai probes among the probes kept in one folder. The test of the template's destination checks the folders up to the probe's own folder, which the author creates. 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
sov_ai_facts,sov_ai_dynamicandsov_ai_multilingual_parityeach live in one folder: the probe moduleprobe.py, its bank loader, its scorerscorer.pyand its banks inassets/<label>/, the folder the class names as itsassets_root. Each probe's tests are intests/probes/<label>/. That is the layout a probe shipped in its own package uses; the probes' capability entries stay intaxonomy/capabilities.py. Labels, scorer names, banks, stored columns and the caches each probe shares with its scorer are unchanged.Builds on #120.
usersim/engine/probes/<label>/assets/. Until its class registers, the asset lookup takes that folder as the declared root when it holds the probe's folder. So a prompt read while the probe's module loads, asgeneral_educationalandgeneral_open_endedread theirs, and a scorer in a process that never imports the probe reach the probe's assets.generator.pyrenamed toprobe.py, the bank loader moved in asbank.py, the scorer asscorer.py, the banks intoassets/<label>/, and the tests intotests/probes/<label>/astest_probe.py,test_scorer.pyandtest_bank.py.BUILTIN_PROBE_MODULES,DEFAULT_SCORER_MODULES, the capability source references and the docs name the new modules, and the shared-code label allowances drop the moved files.core/probing_taxonomy.pystays shared, sincefinancial_servicesuses its format,select_categoryand its cache. Only the three helpers that namesov_ai_dynamic's files move, tosov_ai_dynamic/taxonomy.py, and the shared module names no probe. Their tests and the checks of every shipped taxonomy move totests/probes/sov_ai_dynamic/test_taxonomy.py.<label> scorer:.tests/probes/<label>/, beside an__init__.py.How it was verified
At each commit, on that commit's tree:
The test count is 4653 at every commit.
At the head:
The first commit's test fails without the fix:
make health-checkran against a custom provider config for each moved probe, two turns each:sov_ai_factsinpt_BR,sov_ai_dynamicinja_JPandsov_ai_multilingual_parityinfr_FR. Each ended with✓ simulate, eval and report all completed, and every model's requests showfailed=0.usersim simulate, thenusersim evalnaming each probe's scorer, ran against the same config,sov_ai_factsinde_DE,sov_ai_dynamicinko_KRandsov_ai_multilingual_parityinhi_Deva_IN:Results impact
Conversations, prompts and scores are unchanged. The setup fingerprint of a
simulate --inputsrun hashes the contents of every asset root, so it changes, as after any bank edit, and such a run gives its rows new trajectory ids rather than skipping rows it wrote before this change.