Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't skip listing probes in 100%-pass-rate modules #781

Merged
merged 5 commits into from
Jul 30, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions garak/analyze/report_digest.py
Original file line number Diff line number Diff line change
@@ -15,6 +15,8 @@

from garak import _config

SHOW_100_PERCENT_MODULES = True

templateLoader = jinja2.FileSystemLoader(
searchpath=_config.transient.basedir / "analyze" / "templates"
)
@@ -174,7 +176,7 @@ def compile_digest(report_path, taxonomy=_config.reporting.taxonomy):
}
)

if top_score < 100.0:
if SHOW_100_PERCENT_MODULES or top_score < 100.0:
res = cursor.execute(
f"select probe_module, probe_class, avg(score)*100 as s from results where probe_group='{probe_group}' group by probe_class order by s asc, probe_class asc;"
)
@@ -231,4 +233,4 @@ def compile_digest(report_path, taxonomy=_config.reporting.taxonomy):
if len(sys.argv) == 3:
taxonomy = sys.argv[2]
digest_content = compile_digest(report_path, taxonomy=taxonomy)
print(digest_content.encode("utf-8"))
print(digest_content)
jmartin-tech marked this conversation as resolved.
Show resolved Hide resolved