From 7968d60b0e4e9cfbd3085168c0a8bba7dad793ef Mon Sep 17 00:00:00 2001 From: Rohit7824567 Date: Thu, 19 Mar 2026 20:31:30 +0530 Subject: [PATCH] Fix checkpoint saving condition in predict.py checkpoint interval now counts newly processed images, not loop index fix# --- training_pipeline/predict.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/training_pipeline/predict.py b/training_pipeline/predict.py index 27886f7..7b3450b 100644 --- a/training_pipeline/predict.py +++ b/training_pipeline/predict.py @@ -92,7 +92,7 @@ def predict_batch(model, image_paths, device="cuda", threshold=0.5, checkpoint_p processed_images.append(image_path) # Save checkpoint every 10 images - if checkpoint_path and (i + 1) % 10 == 0: + if checkpoint_path and newly_processed % 10 == 0: metadata = { 'device': device, 'threshold': threshold,