Repository navigation
Start a classifier retrain from the job form - #1504
Open
mohamedelabbas1996 wants to merge 3 commits into
Open
mohamedelabbas1996 wants to merge 3 commits into
mohamedelabbas1996 wants to merge 3 commits into
Conversation
The job form only made processing jobs. Retraining had to be posted by hand, which put it out of reach of the people the feature is for. The form now asks for the job type first, and the processing fields and the retraining fields are the two branches of that choice. Retraining asks for the algorithm, an optional occurrence set, and the two settings worth changing per run. The occurrence set is optional and empty means every verified occurrence in the project, which is the ordinary case. A split ratio is unanswerable without knowing what is behind it, so the form reports what the run would learn from - crops, occurrences, species, and how the split falls - and re-reads it as the set or the ratio changes. Verified crops with no embedding from the chosen algorithm are called out, since they are silently left out of the run.
Leaving a setting empty means "use the algorithm's own", but the empty field was sent as an empty string, which the job then tried to read as a number and failed on at run time. Empty fields are left out of the params instead. A ratio outside the valid range is also no longer asked about: the field already reports it, and the summary request behind it could only come back as an error.
The list reads its type labels from a map that the new type was missing from, so every retraining run showed a blank Type while the API was already naming it.
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Deploy Preview for antenna-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
mohamedelabbas1996
added this pull request to stack #1505
October 9, 2026 05:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Lets someone start a retrain from the job form. Split out of #1494, which this replaces.
The form only made processing jobs, so retraining had to be posted by hand - out of reach of the people the feature is for.
The form
The type is the first question, and the processing fields and the retraining fields are the two branches of that choice:
Only algorithms a processing service reports as trainable are offered:
It says what the run would learn from
A split ratio is unanswerable without knowing what is behind it. With no set chosen the numbers are every verified occurrence in the project, which is what a run without a set does. Crops with no embedding from the chosen algorithm are named rather than quietly dropped:
Choosing a set narrows them:
The settings are editable per run and the numbers follow. A held-out share of 0.5 moves the split:
Raising the minimum crops per species drops what cannot be learned, and says so:
A setting no run could use is refused on the field, and not asked about:
Saved runs appear in the list, typed:
Patterns
Modelled on
capture-set-details-form.tsx, which is the closest existing form of this shape:watchon the field that switches the rest,FormController+InputContent, pickers at the foot of the file asSamplingTypePickeris, fixed choices as a local options array, and the summary hook usinggetFetchUrlwith aconvertServerRecordlikeuseStatus. All copy goes throughtranslate(STRING.*).Two fixes found while testing it from the browser: an empty setting was sent as
""and would have failed the run when read as a number, and the jobs list showed a blank Type for every retrain because its label map was missing the new type.Stack