Refactor: 프로젝트 당 학습 모델 1개

This commit is contained in:
정현조 2024-10-04 13:43:04 +09:00
parent b841e61730
commit 4866027334
2 changed files with 4 additions and 3 deletions

View File

@ -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>

View File

@ -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) {