Skip to content

Commit ff8608e

Browse files
fix: add default bbox to prediction config to ensure validation passes
1 parent bb71555 commit ff8608e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

backend/core/tasks.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,13 @@ def predict_area(prediction_request_id):
526526
predict_area.request.id,
527527
)
528528
inst.save()
529+
if not inst.config.get("bbox"):
530+
inst.config["bbox"] = [
531+
0,
532+
0,
533+
0,
534+
0,
535+
] # add default bbox to pass through validation , TODO : Fix this , improve the pydantic model at fairpredictor side
529536
params = PredictionRequest(**inst.config)
530537
predictions = asyncio.run(
531538
predict(

0 commit comments

Comments
 (0)