-
Notifications
You must be signed in to change notification settings - Fork 29
Enable custom AI Instance Segmentation jobs #8849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
4e6c661
59ecc38
a35e8fc
2be6e63
475175e
bbd0657
0c1dda0
0a8bd90
e4b3441
9b7d33e
15850d0
f516eb3
11dfad2
9a4dfde
e10df97
b9d429f
377ddf6
2473f91
fd71ced
a5afc38
433a5b5
95c78ed
77c0faf
682287f
ed811da
461dbb5
0f80b11
2c2495c
ca08d0f
5028633
578f68b
ffac159
3c69584
2fad242
0d90fad
72478d8
831f0a9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,7 +126,7 @@ export function JobState({ job }: { job: APIJob }) { | |
|
||
return ( | ||
<Tooltip title={tooltip}> | ||
<span className="icon-margin-right">{icon}</span> | ||
<span>{icon}</span> | ||
{jobStateNormalized} | ||
</Tooltip> | ||
); | ||
|
@@ -235,7 +235,7 @@ function JobListView() { | |
) { | ||
return ( | ||
<span> | ||
Neuron inferral for layer {job.layerName} of{" "} | ||
AI Neuron inferral for layer <i>{job.layerName}</i> of{" "} | ||
<Link to={linkToDataset}>{job.datasetName}</Link>{" "} | ||
</span> | ||
); | ||
Comment on lines
+238
to
241
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. User-visible wording: fix “inferral” and grammar These UI strings are shown to end-users. “Inferral” is non-standard; “inference” is the correct term. Also, “AI instances segmentation” should be “AI instance segmentation.” Apply this diff to correct the wording: - AI Neuron inferral for layer <i>{job.layerName}</i> of{" "}
+ AI Neuron inference for layer <i>{job.layerName}</i> of{" "} - AI Mitochondria inferral for layer <i>{job.layerName}</i> of{" "}
+ AI Mitochondria inference for layer <i>{job.layerName}</i> of{" "} - AI instances segmentation for layer <i>{job.layerName}</i> of{" "}
+ AI instance segmentation for layer <i>{job.layerName}</i> of{" "} Also applies to: 259-262, 263-269 🤖 Prompt for AI Agents
|
||
|
@@ -256,14 +256,21 @@ function JobListView() { | |
) { | ||
return ( | ||
<span> | ||
Mitochondria inferral for layer {job.layerName} of{" "} | ||
AI Mitochondria inferral for layer <i>{job.layerName}</i> of{" "} | ||
<Link to={linkToDataset}>{job.datasetName}</Link>{" "} | ||
</span> | ||
); | ||
} else if (job.type === APIJobType.INFER_INSTANCES && linkToDataset != null && job.layerName) { | ||
return ( | ||
<span> | ||
AI instance segmentation for layer <i>{job.layerName}</i> of{" "} | ||
<Link to={linkToDataset}>{job.datasetName}</Link>{" "} | ||
</span> | ||
); | ||
} else if (job.type === APIJobType.ALIGN_SECTIONS && linkToDataset != null && job.layerName) { | ||
return ( | ||
<span> | ||
Align sections for layer {job.layerName} of{" "} | ||
Align sections for layer <i>{job.layerName}</i> of{" "} | ||
<Link to={linkToDataset}>{job.datasetName}</Link>{" "} | ||
</span> | ||
); | ||
|
@@ -277,11 +284,19 @@ function JobListView() { | |
: null} | ||
</span> | ||
); | ||
} else if (job.type === APIJobType.TRAIN_NEURON_MODEL || APIJobType.DEPRECATED_TRAIN_MODEL) { | ||
const numberOfTrainingAnnotations = job.trainingAnnotations.length; | ||
} else if ( | ||
job.type === APIJobType.TRAIN_NEURON_MODEL || | ||
job.type === APIJobType.TRAIN_INSTANCE_MODEL || | ||
job.type === APIJobType.DEPRECATED_TRAIN_MODEL | ||
) { | ||
const numberOfTrainingAnnotations = job.trainingAnnotations?.length || 0; | ||
const modelName = | ||
job.type === APIJobType.TRAIN_NEURON_MODEL || job.type === APIJobType.DEPRECATED_TRAIN_MODEL | ||
? "neuron model" | ||
: "instance model"; | ||
return ( | ||
<span> | ||
{`Train neuron model on ${numberOfTrainingAnnotations} ${Utils.pluralize("annotation", numberOfTrainingAnnotations)}. `} | ||
{`Train ${modelName} on ${numberOfTrainingAnnotations} ${Utils.pluralize("annotation", numberOfTrainingAnnotations)}. `} | ||
{getShowTrainingDataLink(job.trainingAnnotations)} | ||
</span> | ||
Comment on lines
+299
to
301
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Guard “Show Training Data” link against empty arrays If trainingAnnotations is an empty array, getShowTrainingDataLink will access index 0 and throw. Gate the link on count > 0. Apply this diff: - {getShowTrainingDataLink(job.trainingAnnotations)}
+ {numberOfTrainingAnnotations > 0 &&
+ getShowTrainingDataLink(job.trainingAnnotations)} Alternatively, harden getShowTrainingDataLink itself to return null when length === 0: export const getShowTrainingDataLink = (trainingAnnotations?: { annotationId: string }[]) => {
if (!trainingAnnotations || trainingAnnotations.length === 0) return null;
return trainingAnnotations.length > 1
? /* multi-annotation modal link */
: /* single annotation link */;
}; 🤖 Prompt for AI Agents
|
||
); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Serialize category as string to match frontend contract
publicWrites currently passes an Option[AiModelCategory]. Unless an implicit Writes exists for AiModelCategory, this will either not compile or produce unexpected JSON. The frontend expects a string union.
Apply:
📝 Committable suggestion
🤖 Prompt for AI Agents