wording fixes
This commit is contained in:
@@ -32,6 +32,13 @@ export class GovernanceApi {
|
||||
return this.http.post<ModelVersion>(`/governance/model-versions/${domain}/${scenario}/${version}/promote`, {});
|
||||
}
|
||||
|
||||
/** Exports the scenario's latest dbt cohort build, trains a PROD version and tries to promote it, the same
|
||||
* one-shot pipeline the `entrenar` compose profile runs. 409 when it trained but needs its reports attached
|
||||
* before it can be promoted; 503 with no dbt manifest configured or an operational failure. */
|
||||
trainModelVersion(domain: string, scenario: string): Observable<{ output: string }> {
|
||||
return this.http.post<{ output: string }>(`/governance/model-versions/${domain}/${scenario}/train`, {});
|
||||
}
|
||||
|
||||
retireModelVersion(domain: string, scenario: string, version: string): Observable<ModelVersion> {
|
||||
return this.http.post<ModelVersion>(`/governance/model-versions/${domain}/${scenario}/${version}/retire`, {});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable, inject } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { PendingRiskBatch } from './risk-batches.types';
|
||||
|
||||
/** `/<domain>/riesgos/lotes`: risk batches a model produced and nobody has reviewed yet (ADR-MD-008). Only `cacu`
|
||||
* is served today. */
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class RiskBatchesApi {
|
||||
private readonly http = inject(HttpClient);
|
||||
|
||||
listPending(domain: string): Observable<PendingRiskBatch[]> {
|
||||
return this.http.get<PendingRiskBatch[]>(`/${domain}/riesgos/lotes`);
|
||||
}
|
||||
|
||||
/** Moves every current evaluation of the batch to `final`: it becomes the one patient records read. */
|
||||
confirm(domain: string, loteId: number, reason: string): Observable<{ lote_id: number; evaluaciones_cambiadas: number }> {
|
||||
return this.http.post<{ lote_id: number; evaluaciones_cambiadas: number }>(
|
||||
`/${domain}/riesgos/lotes/${loteId}/confirmar`, { reason },
|
||||
);
|
||||
}
|
||||
|
||||
/** Moves every current evaluation of the batch to `entered-in-error` instead. */
|
||||
void(domain: string, loteId: number, reason: string): Observable<{ lote_id: number; evaluaciones_cambiadas: number }> {
|
||||
return this.http.post<{ lote_id: number; evaluaciones_cambiadas: number }>(
|
||||
`/${domain}/riesgos/lotes/${loteId}/anular`, { reason },
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
/** A risk batch waiting for someone to confirm or void it (ADR-MD-008); invisible to patient records until
|
||||
* confirmed. */
|
||||
export interface PendingRiskBatch {
|
||||
lote_id: number;
|
||||
modelo_nombre: string;
|
||||
modelo_version: string;
|
||||
evaluado_en: string;
|
||||
n_evaluaciones: number;
|
||||
}
|
||||
Reference in New Issue
Block a user