Add new frontend - fix 19
This commit is contained in:
@@ -1,12 +1,49 @@
|
||||
// src/api/services/TrainingService.ts
|
||||
import { apiClient } from '../base/apiClient';
|
||||
import {
|
||||
ApiResponse,
|
||||
TrainingRequest,
|
||||
TrainingJobStatus,
|
||||
TrainedModel,
|
||||
ApiResponse
|
||||
} from '../types/api';
|
||||
|
||||
import {
|
||||
ApiResponse
|
||||
} from '@/api/services';
|
||||
|
||||
export interface TrainingJobStatus {
|
||||
id: string;
|
||||
tenant_id: string;
|
||||
status: 'queued' | 'running' | 'completed' | 'failed' | 'cancelled';
|
||||
progress: number;
|
||||
current_step?: string;
|
||||
started_at: string;
|
||||
completed_at?: string;
|
||||
duration_seconds?: number;
|
||||
models_trained?: Record<string, any>;
|
||||
metrics?: Record<string, any>;
|
||||
error_message?: string;
|
||||
}
|
||||
|
||||
export interface TrainingRequest {
|
||||
force_retrain?: boolean;
|
||||
products?: string[];
|
||||
training_days?: number;
|
||||
}
|
||||
|
||||
export interface TrainedModel {
|
||||
id: string;
|
||||
product_name: string;
|
||||
model_type: string;
|
||||
model_version: string;
|
||||
mape?: number;
|
||||
rmse?: number;
|
||||
mae?: number;
|
||||
r2_score?: number;
|
||||
training_samples?: number;
|
||||
features_used?: string[];
|
||||
is_active: boolean;
|
||||
created_at: string;
|
||||
last_used_at?: string;
|
||||
}
|
||||
|
||||
export interface TrainingJobProgress {
|
||||
id: string;
|
||||
status: 'queued' | 'running' | 'completed' | 'failed' | 'cancelled';
|
||||
|
||||
Reference in New Issue
Block a user