Skip to content

Commit

Permalink
Merge branch 'development' into user_stories_cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
yolaj-nhs committed Sep 11, 2023
2 parents fd087fc + 63f5ce6 commit 715d701
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions aisdc/attacks/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,10 +324,17 @@ def add_output_to_pdf(report_dest: str, pdf_report: FPDF, attack_type: str) -> N
else:
pdf_report.output(report_dest + ".pdf")
if attack_type in ("WorstCaseAttack", "LikelihoodAttack"):
os.remove(report_dest + "_log_roc.png")
path = report_dest + "_log_roc.png"
if os.path.exists(path):
os.remove(path)
elif attack_type == "AttributeAttack":
os.remove(report_dest + "_cat_frac.png")
os.remove(report_dest + "_cat_risk.png")
path = report_dest + "_cat_frac.png"
if os.path.exists(path):
os.remove(path)

path = report_dest + "_cat_risk.png"
if os.path.exists(path):
os.remove(path)


def _add_log_roc_to_page(log_roc: str = None, pdf_obj: FPDF = None):
Expand Down

0 comments on commit 715d701

Please sign in to comment.