Fix: NameError in TAP/PAIR probes#1452
Merged
jmartin-tech merged 1 commit intoNVIDIA:mainfrom Oct 31, 2025
Merged
Conversation
… target_name Signed-off-by: Gal Moshkovitz <gal.moshko@gmail.com>
Contributor
Author
|
I have read the CA_DCO Document and I hereby sign the CA_DCO |
jmartin-tech
approved these changes
Oct 31, 2025
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
Fixes NameError in
garak/resources/tap/generator_utils.pythat breaks TAP and PAIR probe functionality.Fixes issue #1451
Branch: Submitting from unique branch
tap-pair-fix-target_name-AssertionErrortomainupstream.Problem
Line 40 of
garak/resources/tap/generator_utils.pyreferences undefined variabletarget_nameinstead of the function parametermodel_name, causing an immediate NameError crash when TAP or PAIR probes attempt to load generators.Buggy code:
Solution
Changed line 40 to use the correct function parameter
model_name:This is a simple one-line fix with no side effects.
Verification
python -m garak --target_type openai --target_name gpt-3.5-turbo --probes tap.TAPpython -m pytest tests/(all tests pass)target_nametomodel_nameTesting Performed
python -m pytest tests/- Testing environment requires dependenciesChange Details
File modified:
garak/resources/tap/generator_utils.pyLines changed: 1 line (line 40)
Change type: Bug fix - variable name correction
Breaking changes: None
New dependencies: None
Impact
Before fix:
After fix:
Root Cause
Copy-paste error where validation logic was copied from code using
target_name(common throughout garak for CLI args) but this specific function uses parameter namemodel_namefor clarity within the TAP module.I have read the CA_DCO Document and I hereby sign the CA_DCO