Skip to content

Commit

Permalink
fix: use the same predictor_version for all spellcheck predictions
Browse files Browse the repository at this point in the history
  • Loading branch information
raphael0202 committed Sep 12, 2024
1 parent 97573b1 commit 857fea1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions robotoff/batch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,17 @@ def import_spellcheck_batch_predictions(batch_dir: str) -> None:

# Generate predictions
predictions = []
# We increment to allow import_insights to create a new version
predictor_version = "llm-v1-" + datetime.datetime.now().strftime("%Y%m%d%H%M%S")

for _, row in df.iterrows():
predictions.append(
Prediction(
type=PredictionType.ingredient_spellcheck,
data={"original": row["text"], "correction": row["correction"]},
value_tag=row["lang"],
barcode=row["code"],
# We increment to allow import_insights to create a new version
predictor_version="llm-v1-"
+ datetime.datetime.now().strftime("%Y%m%d%H%M%S"),
predictor_version=predictor_version,
predictor="fine-tuned-mistral-7b",
automatic_processing=False,
)
Expand Down

0 comments on commit 857fea1

Please sign in to comment.