refactor(admin): drop simulations/experiments/models pages; group nav into sections
Removes the in-shell MLOps pages (experiments, models, simulations) and their client API helpers in favour of external MLflow/Airflow links. Nav is regrouped into Signals / Recommender status / Ops sections for clarity. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -220,67 +220,3 @@ export function saveQuery(name: string, querySql: string) {
|
||||
export function deleteSavedQuery(id: string) {
|
||||
return apiFetch<{ ok: boolean }>(`/admin/saved-queries/${id}`, { method: 'DELETE' });
|
||||
}
|
||||
|
||||
// ── Simulation ─────────────────────────────────────────────────────────────
|
||||
|
||||
export interface PolicySummary {
|
||||
total_reward: number;
|
||||
mean_reward: number;
|
||||
n_pulls: number;
|
||||
cumulative_rewards: number[];
|
||||
action_counts: Record<string, number>;
|
||||
}
|
||||
|
||||
export interface SimRun {
|
||||
id: string;
|
||||
policyA: string;
|
||||
policyB: string;
|
||||
nUsers: number;
|
||||
nRounds: number;
|
||||
tasksPerRound: number;
|
||||
useLlm: boolean;
|
||||
status: 'pending' | 'running' | 'done' | 'failed';
|
||||
summaryJson: string | null;
|
||||
winner: string | null;
|
||||
personaBreakdownJson: string | null;
|
||||
createdAt: string;
|
||||
finishedAt: string | null;
|
||||
isRunning?: boolean;
|
||||
}
|
||||
|
||||
export interface SimEvent {
|
||||
id: string;
|
||||
runId: string;
|
||||
round: number;
|
||||
userId: string;
|
||||
persona: string;
|
||||
policy: string;
|
||||
tipContent: string;
|
||||
priority: number;
|
||||
isOverdue: boolean;
|
||||
action: string;
|
||||
rewardMilli: number;
|
||||
hour: number;
|
||||
dayOfWeek: number;
|
||||
}
|
||||
|
||||
export function startSimulation(params: {
|
||||
nUsers: number;
|
||||
nRounds: number;
|
||||
tasksPerRound: number;
|
||||
useLlm: boolean;
|
||||
policies: string[];
|
||||
}) {
|
||||
return apiFetch<{ id: string; status: string }>('/admin/simulate/start', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(params),
|
||||
});
|
||||
}
|
||||
|
||||
export function getSimRuns() {
|
||||
return apiFetch<{ runs: SimRun[] }>('/admin/simulate/runs');
|
||||
}
|
||||
|
||||
export function getSimRun(id: string) {
|
||||
return apiFetch<{ run: SimRun; events: SimEvent[] }>(`/admin/simulate/${id}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user