Lesion size extracted from pathology reports; development record route; scenario catalog and background training jobs in governance

This commit is contained in:
rockdrigo
2026-11-21 03:28:13 -06:00
parent fae6b2232f
commit 2d71fe1103
11 changed files with 489 additions and 9 deletions
+16 -1
View File
@@ -1,4 +1,4 @@
"""What a model's production version found about its cohort: `GET /<domain>/modelo/curvas`.
"""What a model's production version found about its cohort: `GET /<domain>/modelo/curvas` and `GET /<domain>/modelo/desarrollo`.
The population results a training run publishes (`analisis/curvas.json`, `models.cama.survival.population`): the cohort's
survival curves and the model's survival at each horizon with its intervals, for the dashboard to draw. They describe the
@@ -32,4 +32,19 @@ def model_analysis_blueprint(domain: str, scenario: str) -> Blueprint:
"mlflow_run_id": resolved.run_id},
"curvas": json.loads(content)})
@blueprint.get("/modelo/desarrollo")
def development():
"""The development stages' tables and figures of the scenario's production version."""
from models.io.registry import registry
try:
resolved = registry.resolve(domain, scenario)
_, content = registry.artifact(domain, scenario, resolved.version, "analisis/desarrollo.json")
except LookupError as error:
return jsonify({"error": f"sin desarrollo: {error}"}), 404
return jsonify({"simulado": simulated_data(),
"modelo": {"nombre": f"{domain}-{scenario}", "version": str(resolved.version),
"mlflow_run_id": resolved.run_id},
"desarrollo": json.loads(content)})
return blueprint