From 9ab472ce1b38158903f7334b4bf36a9306654c0d Mon Sep 17 00:00:00 2001 From: MythEclipse Date: Fri, 12 Jun 2026 16:43:53 +0000 Subject: [PATCH] fix(ml-service): add missing status field in PredictionResponse + fix unused variable - PredictionResponse::status was missing in prediction_response() - Prefix preprocess_start with underscore for unused variable warning Co-Authored-By: Claude --- apps/ml-service/src/routes.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/ml-service/src/routes.rs b/apps/ml-service/src/routes.rs index b966918..2bc61bc 100644 --- a/apps/ml-service/src/routes.rs +++ b/apps/ml-service/src/routes.rs @@ -61,6 +61,7 @@ pub fn metadata_response(model_path: String, model_loaded: bool, input_size: u32 pub fn prediction_response(prediction: Prediction) -> PredictionResponse { PredictionResponse { + status: "ok".to_string(), label: prediction.label, confidence: prediction.confidence, probabilities: prediction.probabilities, @@ -131,7 +132,7 @@ pub async fn predict( }; // Preprocess the image - let preprocess_start = std::time::Instant::now(); + let _preprocess_start = std::time::Instant::now(); let input = preprocess_image(&bytes, state.model.input_size())?; // Record image size metric