fix: check driver command for adding worker

This commit is contained in:
jialin
2025-10-20 19:11:02 +08:00
parent 9b843151fe
commit 3a7a4ccf30
12 changed files with 162 additions and 61 deletions
+7 -4
View File
@@ -72,10 +72,15 @@ const DataForm: React.FC<DataFormProps> = forwardRef((props, ref) => {
// voxbox is not support multi gpu
const updateGPUSelector = (backend: string) => {
const gpuids = form.getFieldValue(['gpu_selector', 'gpu_ids']) || [];
const gpusPerReplicas =
form.getFieldValue(['gpu_selector', 'gpus_per_replica']) || null;
if (backend === backendOptionsMap.voxBox && gpuids.length > 0) {
return {
gpu_selector: { gpu_ids: [gpuids[0]] }
gpusCountType: gpusCountTypeMap.Auto,
gpu_selector: {
gpu_ids: [gpuids[0]]
}
};
}
return {
@@ -131,9 +136,7 @@ const DataForm: React.FC<DataFormProps> = forwardRef((props, ref) => {
getGPUOptionList({ clusterId: value });
getBackendOptions({ cluster_id: value });
if (scheduleType === ScheduleValueMap.Manual) {
form.setFieldsValue({
gpu_selector: { gpu_ids: [] }
});
form.setFieldValue(['gpu_selector', 'gpu_ids'], []);
}
};