Refactor: 프로젝트 당 학습 모델 1개
This commit is contained in:
parent
b841e61730
commit
4866027334
@ -70,6 +70,7 @@ export default function TrainingSettings({
|
|||||||
const selected = models?.find((model) => model.id === parseInt(value, 10));
|
const selected = models?.find((model) => model.id === parseInt(value, 10));
|
||||||
setSelectedModel(selected || null);
|
setSelectedModel(selected || null);
|
||||||
}}
|
}}
|
||||||
|
disabled={isWaiting || isTraining}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -34,13 +34,13 @@ export default function TrainingTab({ projectId }: TrainingTabProps) {
|
|||||||
);
|
);
|
||||||
setIsTraining(newIsTraining);
|
setIsTraining(newIsTraining);
|
||||||
|
|
||||||
if (selectedModel && trainingModels.some((model) => model.id === selectedModel.id)) {
|
if (trainingModels.length > 0) {
|
||||||
setSelectedModel(selectedModel);
|
setSelectedModel(trainingModels[0]);
|
||||||
} else {
|
} else {
|
||||||
setSelectedModel(null);
|
setSelectedModel(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [models, selectedModel]);
|
}, [models]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (models && selectedModel) {
|
if (models && selectedModel) {
|
||||||
|
Loading…
Reference in New Issue
Block a user