Explorar el Código

修复前端报错

lxylxy123321 hace 1 semana
padre
commit
3c14b23522
Se han modificado 2 ficheros con 7 adiciones y 6 borrados
  1. 1 1
      frontend/src/api/client.ts
  2. 6 5
      frontend/src/pages/Training.tsx

+ 1 - 1
frontend/src/api/client.ts

@@ -176,7 +176,7 @@ interface DatasetValidation {
   warnings?: string[]
 }
 
-export interface TrainingJob {
+interface TrainingJob {
   id: string
   model_id: string
   model_type: string

+ 6 - 5
frontend/src/pages/Training.tsx

@@ -266,15 +266,16 @@ export function Training() {
     const tempJob: TrainingJob = {
       id: tempId,
       model_id: modelId,
+      model_type: modelType,
       peft_method: peftMethod,
       status: 'pending',
       progress: 0,
-      loss: null,
+      loss: undefined,
       created_at: new Date().toISOString(),
-      started_at: null,
-      finished_at: null,
-      error_message: null,
-      adapter_path: null,
+      started_at: undefined,
+      finished_at: undefined,
+      error_message: undefined,
+      adapter_path: undefined,
       current_epoch: 0,
       current_step: 0,
       total_steps: 0,