Skip to content

Fix/recommended detector migration#1409

Merged
jmartin-tech merged 8 commits intoNVIDIA:mainfrom
patriciapampanelli:fix/recommended_detector_migration
Oct 23, 2025
Merged

Fix/recommended detector migration#1409
jmartin-tech merged 8 commits intoNVIDIA:mainfrom
patriciapampanelli:fix/recommended_detector_migration

Conversation

@patriciapampanelli
Copy link
Collaborator

@patriciapampanelli patriciapampanelli commented Oct 13, 2025

This PR addresses issue #531 by migrating from the deprecated recommended_detector attribute to the new primary/extended pattern. The migration maintains backward compatibility through fallback mechanism.

Changes

  • Probes: all probes with deprecated recommended_detector attribute
  • Tests (tests/probes/test_probes.py)
  • Documentation
    • docs/source/how.rst
    • docs/source/extending.probe.rst
    • README.md
  • Plugin Cache (garak/_plugins.py)
    • Added "recommended_detector" to the skip_fields list in the plugin_info method
    • This prevents the deprecated attribute from being serialized into plugin_cache.json

@patriciapampanelli patriciapampanelli self-assigned this Oct 13, 2025
patriciapampanelli and others added 5 commits October 14, 2025 07:27
Signed-off-by: Patricia Pampanelli <[email protected]>
Signed-off-by: Patricia Pampanelli <[email protected]>
Signed-off-by: Patricia Pampanelli <[email protected]>
@patriciapampanelli patriciapampanelli marked this pull request as ready for review October 14, 2025 17:17
greptile-apps[bot]

This comment was marked as outdated.

Copy link
Collaborator

@leondz leondz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thank you

):
from garak import command
command.deprecation_notice(
f"recommended_detector in probe {self.probename}",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
f"recommended_detector in probe {self.probename}",
f"recommended_detector in probe {self.probename} - use primary_detector and extended_detectors",

"prompts",
"triggers",
"post_buff_hook",
"recommended_detector",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, I like this idea

* `resources/` - ancillary items required by plugins

The default operating mode is to use the `probewise` harness. Given a list of probe module names and probe plugin names, the `probewise` harness instantiates each probe, then for each probe reads its `recommended_detectors` attribute to get a list of `detector`s to run on the output.
The default operating mode is to use the `probewise` harness. Given a list of probe module names and probe plugin names, the `probewise` harness instantiates each probe, then for each probe reads its `primary_detector` and `extended_detectors` attributes to get a list of `detector`s to run on the output.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow this was important to update, thanks

@jmartin-tech jmartin-tech merged commit 965c706 into NVIDIA:main Oct 23, 2025
15 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Oct 23, 2025
@patriciapampanelli patriciapampanelli deleted the fix/recommended_detector_migration branch November 17, 2025 19:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants