From f2ce5572bddc5c44aff8e627c4e6b813b53f7822 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Wed, 3 Dec 2025 11:13:27 -0700 Subject: [PATCH] Don't require state classification models to select all classes --- .../locales/en/views/classificationModel.json | 2 +- .../wizard/Step3ChooseExamples.tsx | 28 +------------------ 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/web/public/locales/en/views/classificationModel.json b/web/public/locales/en/views/classificationModel.json index 7852bb550..1b1ec811a 100644 --- a/web/public/locales/en/views/classificationModel.json +++ b/web/public/locales/en/views/classificationModel.json @@ -177,7 +177,7 @@ "generateSuccess": "Successfully generated sample images", "missingStatesWarning": { "title": "Missing State Examples", - "description": "You haven't selected examples for all states. The model will not be trained until all states have images. After continuing, use the Recent Classifications view to classify images for the missing states, then train the model." + "description": "It's recommended to select examples for all states for best results. You can continue without selecting all states, but the model will not be trained until all states have images. After continuing, use the Recent Classifications view to classify images for the missing states, then train the model." } } } diff --git a/web/src/components/classification/wizard/Step3ChooseExamples.tsx b/web/src/components/classification/wizard/Step3ChooseExamples.tsx index 47c990071..c4978a1b8 100644 --- a/web/src/components/classification/wizard/Step3ChooseExamples.tsx +++ b/web/src/components/classification/wizard/Step3ChooseExamples.tsx @@ -407,30 +407,6 @@ export default function Step3ChooseExamples({ return allClasses.every((className) => statesWithExamples.has(className)); }, [step1Data.modelType, allClasses, statesWithExamples]); - // For state models on the last class, require all images to be classified - // But allow proceeding even if not all states have examples (with warning) - const canProceed = useMemo(() => { - if (step1Data.modelType === "state" && isLastClass) { - // Check if all 24 images will be classified after current selections are applied - const totalImages = unknownImages.slice(0, 24).length; - - // Count images that will be classified (either already classified or currently selected) - const allImages = unknownImages.slice(0, 24); - const willBeClassified = allImages.filter((img) => { - return imageClassifications[img] || selectedImages.has(img); - }).length; - - return willBeClassified >= totalImages; - } - return true; - }, [ - step1Data.modelType, - isLastClass, - unknownImages, - imageClassifications, - selectedImages, - ]); - const hasUnclassifiedImages = useMemo(() => { if (!unknownImages) return false; const allImages = unknownImages.slice(0, 24); @@ -594,9 +570,7 @@ export default function Step3ChooseExamples({ } variant="select" className="flex items-center justify-center gap-2 sm:flex-1" - disabled={ - !hasGenerated || isGenerating || isProcessing || !canProceed - } + disabled={!hasGenerated || isGenerating || isProcessing} > {isProcessing && } {t("button.continue", { ns: "common" })}