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));
|
||||
setSelectedModel(selected || null);
|
||||
}}
|
||||
disabled={isWaiting || isTraining}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
@ -34,13 +34,13 @@ export default function TrainingTab({ projectId }: TrainingTabProps) {
|
||||
);
|
||||
setIsTraining(newIsTraining);
|
||||
|
||||
if (selectedModel && trainingModels.some((model) => model.id === selectedModel.id)) {
|
||||
setSelectedModel(selectedModel);
|
||||
if (trainingModels.length > 0) {
|
||||
setSelectedModel(trainingModels[0]);
|
||||
} else {
|
||||
setSelectedModel(null);
|
||||
}
|
||||
}
|
||||
}, [models, selectedModel]);
|
||||
}, [models]);
|
||||
|
||||
useEffect(() => {
|
||||
if (models && selectedModel) {
|
||||
|
Loading…
Reference in New Issue
Block a user