Skip to content

Commit

Permalink
feat: add missing_category campaign to track products without categories
Browse files Browse the repository at this point in the history
  • Loading branch information
raphael0202 committed Mar 15, 2023
1 parent 50a3aa4 commit b103e66
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion robotoff/insights/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -773,9 +773,15 @@ def add_optional_fields(cls, insight: ProductInsight, product: Product):
== NeuralCategoryClassifierModel.keras_image_embeddings_3_0.value
and insight.data.get("above_threshold", False)
):
# Add `v3_categorizer_automatic_processing` campaign for
# Add `v3_categorizer_automatic_processing` campaign to category
# insights that will be applied automatically soon
# (experimental phase)
campaigns.append("v3_categorizer_automatic_processing")

if not product.categories_tags:
# Add a campaign to track products with no categories filled in
campaigns.append("missing_category")

insight.campaign = campaigns


Expand Down

0 comments on commit b103e66

Please sign in to comment.