cli: standardise reporting tool invocation patterns#1370
Merged
leondz merged 7 commits intoNVIDIA:mainfrom Sep 17, 2025
NoahOksuz:1368
Merged
cli: standardise reporting tool invocation patterns#1370leondz merged 7 commits intoNVIDIA:mainfrom NoahOksuz:1368
leondz merged 7 commits intoNVIDIA:mainfrom
NoahOksuz:1368
Conversation
Contributor
|
DCO Assistant Lite bot All contributors have signed the DCO ✍️ ✅ |
Contributor
Author
|
I have read the DCO Document and I hereby sign the DCO |
Contributor
Author
|
recheck |
Contributor
Author
|
guys i know it looks like there are a lot of changes in the code but really its just the refactoring |
leondz
requested changes
Sep 16, 2025
Collaborator
leondz
left a comment
There was a problem hiding this comment.
nice, thanks. few small changes & minor clarifications requested
jmartin-tech
requested changes
Sep 16, 2025
Collaborator
|
Good PR, thank you. lgtm |
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.
resolves #1368
issue 1368: Standardizes CLI patterns across all CLI-accessible scripts in
garak.analyze. Each script now:garak.cli)garak <description> v<version>)-r/--report_path,-o/--output_path)if __name__ == "__main__":and not on importUpdated scripts:
aggregate_reports,analyze_log,count_tokens,get_tree,misp,perf_stats,qual_review,report_avid(keptreport_digestas the canonical example). No specific GitHub issue linked; this addresses CLI consistency and import-side-effect issues.Verification
List the steps needed to make sure this thing works
garak -m <model_type> -n <model_name>python -m pytest tests/python -m garak -m test.Blank -p test.Blank --report_prefix _cli_std_checkpython -m garak.analyze.aggregate_reports --helppython -m garak.analyze.analyze_log --helppython -m garak.analyze.count_tokens --helppython -m garak.analyze.get_tree --helppython -m garak.analyze.misp --helppython -m garak.analyze.perf_stats --helppython -m garak.analyze.qual_review --helppython -m garak.analyze.report_avid --help<REPORT>with the path to_cli_std_check.report.jsonl):python -m garak.analyze.analyze_log -r <REPORT>python -m garak.analyze.count_tokens -r <REPORT>python -m garak.analyze.get_tree -r <REPORT>python -m garak.analyze.misp -upython -m garak.analyze.perf_stats -r <REPORT> <REPORT>python -m garak.analyze.qual_review -r <REPORT>python -m garak.analyze.aggregate_reports -o agg.jsonl <REPORT> <REPORT>python -m garak.analyze.report_avid -r <REPORT>python -m garak.analyze.report_digest -r <REPORT>