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

fix(Proofs): Run price tag prediction only on PRICE_TAG proofs #683

Merged
merged 1 commit into from
Jan 19, 2025

Conversation

raphodn
Copy link
Member

@raphodn raphodn commented Jan 19, 2025

What

When diving into our usage of ML, I realized that we run the price_tag_detection model even on non-Price tag proofs.
Nevertheless, we already had a check afterwards that would avoid creating the corresponding PriceTag objects for these kinds of proofs.

So moved up the check, and will cleanup the history once it is deployed

Stats

Proof.objects.count()
// 17485

ProofPrediction.objects.count()
// 34956

ProofPrediction.objects.exclude(proof__type="PRICE_TAG").count()
// 6292

PriceTag.objects.exclude(proof__type="PRICE_TAG").count()
// 0

Counter(ProofPrediction.objects.exclude(proof__type="PRICE_TAG").values_list("model_name", flat=True))
// {'price_proof_classification': 3152, 'price_tag_detection': 3140}

@raphodn raphodn merged commit 4c10f86 into main Jan 19, 2025
10 checks passed
@raphodn raphodn deleted the raphodn/proof-ml-price-tag-only branch January 19, 2025 14:05
raphodn added a commit that referenced this pull request Jan 19, 2025
@raphodn
Copy link
Member Author

raphodn commented Jan 19, 2025

Ran the following command to the cleanup post-deploy

ProofPrediction.objects.exclude(proof__type="PRICE_TAG").filter(model_name="price_tag_detection").delete()
// 3143 objects deleted

@raphodn raphodn linked an issue Jan 19, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a price_tags table to store predictions
1 participant