Repository navigation
Conversation
persona_to_tags, with the region, age, education and occupation tables it reads, is in core/persona_tags.py. sov_ai_facts, sov_ai_dynamic, sov_ai_multilingual_parity, safety_chat_pressure and safety_agentic import it from there, so no probe imports another probe's module for its persona tags, and the tags a persona gets are unchanged. financial_services has its own persona_to_tags. Its tests are in tests/engine/core/test_persona_tags.py. The sov_ai_facts tests check that its banks serve each UK nation and German Land. Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
test_probe_private_imports counts, for each built-in package, the names it imports from usersim modules other than usersim.extension, usersim.testing and its own package, and holds each package to its count in _ALLOWED: a package over its allowance fails, so does an allowance above the count, and so does a package with no allowance. The authoring guide describes the check where it covers registering a built-in. Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
implementation_refs_for_capability gives each probe and scorer a capability names the file its registered class or function is defined in, so a probe or scorer that moves takes its ref along and a new one needs no entry. A test checks that every probe and scorer a capability names resolves to a file, and the shared-code label allowance for taxonomy/capabilities.py matches its 27 labels. Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
The catalog table in docs/probes.md has one row for each built-in probe and no other, so a probe added, renamed or removed without its row fails. 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
Built-in probes stay self-contained: no built-in imports another probe's module, each built-in package's imports of internal
usersimmodules are counted and can only go down, and the capability report's refs and the probe catalog follow the registered probes and scorers.Builds on #126.
persona_to_tagsin core (first commit).persona_to_tags, with the region, age, education and occupation tables it reads, is incore/persona_tags.py.sov_ai_facts,sov_ai_dynamic,sov_ai_multilingual_parity,safety_chat_pressureandsafety_agenticimport it from there, so no probe imports another probe's module for its persona tags;financial_serviceshas its ownpersona_to_tags. Its tests are intests/engine/core/test_persona_tags.py, and thesov_ai_factstests check that its banks serve each UK nation and German Land.tests/test_probe_private_imports.pycounts, for each built-in package, the names it imports fromusersimmodules other thanusersim.extension,usersim.testingand its own package. A package over its allowance fails, so does an allowance above the count, and so does a package with no allowance. The authoring guide describes the check where it covers registering a built-in.implementation_refs_for_capabilitygives each probe and scorer a capability names the file its registered class or function is defined in, so a probe or scorer that moves takes its ref along. A test checks that every probe and scorer a capability names resolves to a file.docs/probes.mdhas one row for each built-in probe and no other.How it was verified
At each commit, on that commit's tree:
That is the first commit's tree; the second, third and fourth pass with 4660, 4661 and 4662 tests, their new tests included.
At the head:
core/persona_tags.pyholds, byte for byte, the 391 lines that leavesov_ai_facts/task_derivation.py.The second commit's tests fail when a package imports a name its allowance does not count, and when an allowance is above its count:
At the third commit, each of the 46 capabilities gets the same refs, in the same order, as at the base.
The fourth commit's test fails with a catalog row removed:
make health-checkran against a custom provider config forsov_ai_multilingual_parityinhi_Deva_IN, which picks its query by persona tags. It 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 forsafety_chat_pressureinko_KR:Results impact
Conversations, prompts, scores and the capability report are unchanged.