Fix: atkgen probe verbose output#1447
Merged
jmartin-tech merged 2 commits intoNVIDIA:mainfrom Oct 31, 2025
Merged
Conversation
Signed-off-by: Gal Moshkovitz <gal.moshko@gmail.com>
Contributor
Author
|
I have read the DCO Document and I hereby sign the DCO |
Contributor
|
DCO Assistant Lite bot All contributors have signed the DCO ✍️ ✅ |
5 tasks
Contributor
Author
|
I have read the CA_DCO Document and I hereby sign the CA_DCO |
Signed-off-by: Gal Moshkovitz <gal.moshko@gmail.com>
Contributor
Author
|
@jmartin-tech |
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.
Summary
Fixes AttributeError crash in
atkgenprobe by updating code to use correctTurnobject structure (turns[-1].content.textinstead ofturns[-1].text).Problem
The
atkgen.Toxprobe (and likely other atkgen probes) crashed immediately when attempting to log conversation output:This prevented the entire atkgen probe family from running.
Root Cause
The
Turnobject structure changed to use a nested architecture:Turnhas a.contentattribute (which is aMessageobject)Messagehas the.textattributeThe code was attempting to access
.textdirectly on theTurnobject, which no longer exists.Solution
Updated line 208 in
garak/probes/atkgen.py:Before:
f"atkgen: 🦜 model: {Style.BRIGHT}{this_attempt.prompt.turns[-1].text}{Style.RESET_ALL}"After:
f"atkgen: 🦜 model: {Style.BRIGHT}{this_attempt.prompt.turns[-1].content.text}{Style.RESET_ALL}"Changes
garak/probes/atkgen.py(1 line changed).turns[-1].textto.turns[-1].content.textTesting
✅ Verified the fix works:
garak --target_type openai_rated --target_name gpt-3.5-turbo-instruct --probes atkgen.Tox --generations 10 -vvatkgen: 🦜 model: ...Impact
Backward Compatibility
✅ Fully compatible - only fixes broken functionality
Related Issue
Closes #1444
Checklist: