Skip to content

Commit

Permalink
Merge pull request #260 from TogetherCrew/feat/218-violation-detection
Browse files Browse the repository at this point in the history
fix: skipping None labels for reporting!
  • Loading branch information
amindadgar authored Aug 12, 2024
2 parents b20d041 + 73fda04 commit 370989b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions dags/violation_detection_helpers/utils/prepare_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ def prepare(self, transformed_documents: list[dict[str, Any]]) -> str | None:

if label and link:
# report for single document
doc_report = f"Document link: {link} | Label: {label}"

reports.append(doc_report)
# if there was a specific label
if label != "None":
doc_report = f"Document link: {link} | Label: {label}"
reports.append(doc_report)
elif label:
logging.error(
f"Document with _id: {id} doesn't have "
Expand Down

0 comments on commit 370989b

Please sign in to comment.