chore: playground mutilmodel input
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
import { createContext } from 'react';
|
||||
import { DashboardProps } from './types';
|
||||
|
||||
export const DashboardContext = createContext<
|
||||
DashboardProps & { fetchData: () => Promise<void> }
|
||||
>({} as DashboardProps & { fetchData: () => Promise<void> });
|
||||
|
||||
export default DashboardContext;
|
||||
@@ -0,0 +1,23 @@
|
||||
export const overviewConfigs = [
|
||||
{
|
||||
key: 'worker_count',
|
||||
label: 'dashboard.workers',
|
||||
backgroundColor: 'var(--color-white-1)'
|
||||
},
|
||||
{
|
||||
key: 'gpu_count',
|
||||
label: 'dashboard.totalgpus',
|
||||
backgroundColor: 'var(--color-white-1)'
|
||||
},
|
||||
|
||||
{
|
||||
key: 'model_count',
|
||||
label: 'dashboard.models',
|
||||
backgroundColor: 'var(--color-white-1)'
|
||||
},
|
||||
{
|
||||
key: 'model_instance_count',
|
||||
label: 'models.form.replicas',
|
||||
backgroundColor: 'var(--color-white-1)'
|
||||
}
|
||||
];
|
||||
@@ -0,0 +1,46 @@
|
||||
export interface DashboardProps {
|
||||
resource_counts: {
|
||||
worker_count: number;
|
||||
gpu_count: number;
|
||||
model_count: number;
|
||||
model_instance_count: number;
|
||||
};
|
||||
system_load: {
|
||||
current: {
|
||||
cpu: number;
|
||||
memory: number;
|
||||
gpu: number;
|
||||
gpu_memory: number;
|
||||
};
|
||||
history: {
|
||||
cpu: {
|
||||
timestamp: number;
|
||||
value: number;
|
||||
}[];
|
||||
memory: {
|
||||
timestamp: number;
|
||||
value: number;
|
||||
}[];
|
||||
gpu: {
|
||||
timestamp: number;
|
||||
value: number;
|
||||
}[];
|
||||
gpu_memory: {
|
||||
timestamp: number;
|
||||
value: number;
|
||||
}[];
|
||||
};
|
||||
};
|
||||
model_usage: {
|
||||
api_request_history: any[];
|
||||
completion_token_history: any[];
|
||||
prompt_token_history: any[];
|
||||
top_users: {
|
||||
user_id: number;
|
||||
username: string;
|
||||
prompt_token_count: number;
|
||||
completion_token_count: number;
|
||||
}[];
|
||||
};
|
||||
active_models: any[];
|
||||
}
|
||||
Reference in New Issue
Block a user