integration layer; merge work on indicators from forks with existing ingestion pipeline
This commit is contained in:
@@ -0,0 +1,149 @@
|
||||
<h2 mat-dialog-title class="title">
|
||||
{{ title }}
|
||||
@if (lineage(); as l) {
|
||||
<app-model-status [status]="l.model_version.status"></app-model-status>
|
||||
}
|
||||
</h2>
|
||||
|
||||
<mat-dialog-content class="content">
|
||||
@if (busy()) {
|
||||
<mat-progress-bar mode="indeterminate" aria-label="Cargando"></mat-progress-bar>
|
||||
}
|
||||
@if (error(); as message) {
|
||||
<p class="alert" role="alert"><mat-icon aria-hidden="true">error</mat-icon>{{ message }}</p>
|
||||
}
|
||||
|
||||
@if (lineage(); as l) {
|
||||
@let v = l.model_version;
|
||||
<section class="summary">
|
||||
<dl>
|
||||
<dt>Dominio · escenario</dt>
|
||||
<dd>{{ v.tags.domain }} · {{ v.tags.scenario }}</dd>
|
||||
<dt>Entorno</dt>
|
||||
<dd>{{ v.tags.environment }}</dd>
|
||||
<dt>Creada</dt>
|
||||
<dd>{{ v.created_at | date: 'medium' }}</dd>
|
||||
@if (v.tags.promovida_en) {
|
||||
<dt>Promovida</dt>
|
||||
<dd>{{ v.tags.promovida_en | date: 'medium' }}</dd>
|
||||
}
|
||||
<dt>Predicciones registradas</dt>
|
||||
<dd>{{ l.predictions | number }}</dd>
|
||||
</dl>
|
||||
@if (metrics(v).length) {
|
||||
<dl class="metrics">
|
||||
@for (metric of metrics(v); track metric[0]) {
|
||||
<dt>{{ metric[0] }}</dt>
|
||||
<dd>{{ metric[1] }}</dd>
|
||||
}
|
||||
</dl>
|
||||
}
|
||||
</section>
|
||||
|
||||
<section aria-labelledby="checks-title">
|
||||
<h3 id="checks-title">Requisitos para producción</h3>
|
||||
<ul class="checks">
|
||||
@for (check of l.checks; track $index) {
|
||||
<li [class.checks__fail]="!check.passed">
|
||||
<mat-icon aria-hidden="true">{{ check.passed ? 'check_circle' : 'cancel' }}</mat-icon>
|
||||
<span class="checks__code">{{ check.code }}</span>
|
||||
<span>{{ check.requirement }}</span>
|
||||
@if (check.detail) {
|
||||
<span class="checks__detail">{{ check.detail }}</span>
|
||||
}
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section aria-labelledby="cohort-title">
|
||||
<h3 id="cohort-title">Cohorte de entrenamiento</h3>
|
||||
@if (l.cohort_version; as cohort) {
|
||||
<p>
|
||||
{{ cohort.domain }} · {{ cohort.scenario }} · criterio {{ cohort.criteria_version }} ·
|
||||
{{ cohort.n_included | number }} de {{ cohort.n_source | number }} episodios
|
||||
</p>
|
||||
<p class="hash" [matTooltip]="cohort.version_hash">hash {{ cohort.version_hash.slice(0, 16) }}…</p>
|
||||
@if (l.cohort_exclusions.length) {
|
||||
<ul class="exclusions">
|
||||
@for (count of l.cohort_exclusions; track count.cohort_exclusion_count_id) {
|
||||
<li>{{ count.criterion_code }} ({{ count.reason_code }}): {{ count.count | number }} excluidos</li>
|
||||
}
|
||||
</ul>
|
||||
}
|
||||
} @else {
|
||||
<p class="muted">Sin cohorte enlazada.</p>
|
||||
}
|
||||
</section>
|
||||
|
||||
<section aria-labelledby="artifacts-title">
|
||||
<h3 id="artifacts-title">Artefactos</h3>
|
||||
<p class="muted">Guardados en la corrida de MLflow; ábrelos desde el servidor de MLflow.</p>
|
||||
<ul class="artifacts">
|
||||
@for (artifact of l.artifacts; track artifact) {
|
||||
<li>
|
||||
<mat-icon aria-hidden="true">description</mat-icon>
|
||||
<span class="artifacts__kind">{{ artifactKindOf(artifact) }}</span>
|
||||
<span class="artifacts__name">{{ artifactName(artifact) }}</span>
|
||||
</li>
|
||||
} @empty {
|
||||
<li class="muted">Sin artefactos.</li>
|
||||
}
|
||||
</ul>
|
||||
<div class="upload">
|
||||
<mat-form-field appearance="outline" subscriptSizing="dynamic">
|
||||
<mat-label>Tipo</mat-label>
|
||||
<mat-select [value]="artifactKind()" (valueChange)="artifactKind.set($event)">
|
||||
@for (kind of artifactKinds; track kind.id) {
|
||||
<mat-option [value]="kind.id">{{ kind.label }}</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<button mat-stroked-button type="button" [disabled]="busy()" (click)="fileInput.click()">
|
||||
<mat-icon aria-hidden="true">upload_file</mat-icon>Subir artefacto
|
||||
</button>
|
||||
<input #fileInput type="file" hidden (change)="uploadArtifact($event)" />
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section aria-labelledby="reports-title">
|
||||
<h3 id="reports-title">Reportes de validación</h3>
|
||||
<form [formGroup]="reports" class="reports" (ngSubmit)="saveReports()">
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-label>Pruebas técnicas (MLD-01)</mat-label>
|
||||
<input matInput formControlName="technical_validation_report_uri" placeholder="Ruta o URL del reporte" />
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-label>Validación clínica (MLD-01b)</mat-label>
|
||||
<input matInput formControlName="clinical_validation_report_uri" placeholder="Ruta o URL del reporte" />
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-label>Interpretabilidad (MLD-03)</mat-label>
|
||||
<input matInput formControlName="interpretability_report_uri" placeholder="Ruta o URL del reporte" />
|
||||
</mat-form-field>
|
||||
<button mat-stroked-button type="submit" [disabled]="busy() || reports.pristine">Guardar reportes</button>
|
||||
</form>
|
||||
</section>
|
||||
}
|
||||
</mat-dialog-content>
|
||||
|
||||
<mat-dialog-actions align="end">
|
||||
<button mat-button type="button" (click)="close()">Cerrar</button>
|
||||
@if (lineage(); as l) {
|
||||
@if (l.model_version.status === 'produccion') {
|
||||
<button mat-stroked-button type="button" [disabled]="busy()" (click)="retire()">
|
||||
<mat-icon aria-hidden="true">pause_circle</mat-icon>Retirar de producción
|
||||
</button>
|
||||
} @else {
|
||||
<button
|
||||
mat-flat-button
|
||||
type="button"
|
||||
[disabled]="busy() || !ready(l.checks)"
|
||||
[matTooltip]="ready(l.checks) ? '' : 'Faltan requisitos para producción'"
|
||||
(click)="promote()"
|
||||
>
|
||||
<mat-icon aria-hidden="true">rocket_launch</mat-icon>Promover a producción
|
||||
</button>
|
||||
}
|
||||
}
|
||||
</mat-dialog-actions>
|
||||
Reference in New Issue
Block a user