CaMa indicators and follow-up list, model governance page
This commit is contained in:
@@ -0,0 +1,116 @@
|
||||
<section class="page">
|
||||
<h1>Gobernanza de modelos</h1>
|
||||
<nav class="domains" aria-label="Dominios">
|
||||
@for (d of domains.value() ?? []; track d) {
|
||||
<a [routerLink]="['/gobernanza', d]" [class.active]="d === domain()">{{ labels[d] ?? d }}</a>
|
||||
}
|
||||
</nav>
|
||||
|
||||
<form class="card actions" (submit)="$event.preventDefault()">
|
||||
<mat-form-field appearance="outline" subscriptSizing="dynamic">
|
||||
<mat-label>Datos hasta</mat-label>
|
||||
<input
|
||||
matInput
|
||||
type="date"
|
||||
[ngModel]="asOf()"
|
||||
(ngModelChange)="asOf.set($event)"
|
||||
name="asOf"
|
||||
/>
|
||||
</mat-form-field>
|
||||
<button mat-flat-button type="button" (click)="start('train')">Entrenar</button>
|
||||
<button mat-stroked-button type="button" (click)="start('score')">Calcular riesgos</button>
|
||||
@if (run(); as r) {
|
||||
<span class="muted" role="status">{{ r.kind }}: {{ r.status }}</span>
|
||||
}
|
||||
</form>
|
||||
@if (message()) {
|
||||
<p class="muted" role="status">{{ message() }}</p>
|
||||
}
|
||||
|
||||
@if (models.isLoading()) {
|
||||
<p class="muted">Cargando modelos…</p>
|
||||
} @else if (!models.value()?.length) {
|
||||
<p class="muted empty">Este dominio todavía no tiene modelos entrenados.</p>
|
||||
}
|
||||
@for (m of models.value() ?? []; track m.name) {
|
||||
<div class="card model">
|
||||
<h2>{{ m.name }}</h2>
|
||||
<table class="plain">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Versión</th>
|
||||
<th>Creada</th>
|
||||
<th>Entrenamiento / prueba</th>
|
||||
<th>Informes</th>
|
||||
<th>Validación clínica</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for (v of m.versions; track v.version) {
|
||||
<tr>
|
||||
<td>
|
||||
v{{ v.version }}
|
||||
@if (champion(v)) {
|
||||
<span class="badge">en producción</span>
|
||||
}
|
||||
</td>
|
||||
<td>{{ v.created | date: 'yyyy-MM-dd HH:mm' }}</td>
|
||||
<td class="num">
|
||||
{{ v.metrics['n_train'] | number }} / {{ v.metrics['n_test'] | number }}
|
||||
</td>
|
||||
<td>
|
||||
@for (r of v.reports; track r) {
|
||||
<a [href]="reportUrl(m.name, v.version, r)" target="_blank" rel="noopener">{{
|
||||
reportNames[r] ?? r
|
||||
}}</a>
|
||||
}
|
||||
@if (v.reports.includes('interpretability')) {
|
||||
<button
|
||||
mat-button
|
||||
type="button"
|
||||
(click)="chosen.set({ name: m.name, version: v.version })"
|
||||
>
|
||||
Ver gráficas
|
||||
</button>
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@if (!v.reports.includes('clinical_validation')) {
|
||||
<input
|
||||
type="file"
|
||||
[attr.aria-label]="'Validación clínica de ' + m.name + ' v' + v.version"
|
||||
(change)="upload(m.name, v.version, $event)"
|
||||
/>
|
||||
} @else {
|
||||
Agregada
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@if (!champion(v)) {
|
||||
<button mat-stroked-button type="button" (click)="promote(m.name, v.version)">
|
||||
Promover
|
||||
</button>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (chosen(); as c) {
|
||||
<div class="card">
|
||||
<h2>Interpretabilidad · {{ c.name }} v{{ c.version }}</h2>
|
||||
@for (f of figures(); track f.title) {
|
||||
<h3>{{ f.title }}</h3>
|
||||
<app-plot [figure]="f.figure" [height]="360" />
|
||||
} @empty {
|
||||
<p class="muted">
|
||||
{{ report.isLoading() ? 'Cargando…' : 'Este informe no tiene gráficas.' }}
|
||||
</p>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</section>
|
||||
Reference in New Issue
Block a user