Skip to content

Commit

Permalink
fix: add default timeout during TF serving request
Browse files Browse the repository at this point in the history
  • Loading branch information
raphael0202 committed Dec 9, 2022
1 parent a94632e commit 9aaceea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion robotoff/prediction/category/neural/category_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ def predict(
}

r = http_session.post(
f"{settings.TF_SERVING_BASE_URL}/category-classifier:predict", json=data
f"{settings.TF_SERVING_BASE_URL}/category-classifier:predict",
json=data,
timeout=(3.0, 10.0),
)
r.raise_for_status()
response = r.json()
Expand Down

0 comments on commit 9aaceea

Please sign in to comment.