diff --git a/tests/test_cama.py b/tests/test_cama.py index 410344a..f2dc4d6 100644 --- a/tests/test_cama.py +++ b/tests/test_cama.py @@ -164,7 +164,9 @@ def test_cama_from_the_hospital_to_indicators(api, platform, tmp_path): # Models: one training run gives a version of each, with its two generated reports; # none is promoted without the clinical validation. current = json.loads((REFERENCE / "models.json").read_text()) - wait_for(api, ok(api.post("/models/cama/train", json={"as_of": TRAINED_ON}))["run_id"]) + # (Recurrence is proved on its own data: models/tests/test_recurrence.py.) + body = {"as_of": TRAINED_ON, "models": ["survival"]} + wait_for(api, ok(api.post("/models/cama/train", json=body))["run_id"]) names = [m["name"] for m in ok(api.get("/models/cama"))] assert set(names) == {n for n, m in current.items() if m["status"] == "ok"} for name in names: diff --git a/tests/test_webapp.py b/tests/test_webapp.py index 3817090..91337a3 100644 --- a/tests/test_webapp.py +++ b/tests/test_webapp.py @@ -28,7 +28,8 @@ def test_every_page_loads_from_the_api(api, platform, site): drawn.replace("{hospital}", str(HOSPITAL))))) # fmt: skip run(api, domain) # A trained CaMa version, unpromoted: what the governance page shows and refuses. - wait_for(api, ok(api.post("/models/cama/train", json={"as_of": "2026-11-24"}))["run_id"]) + body = {"as_of": "2026-11-24", "models": ["survival"]} + wait_for(api, ok(api.post("/models/cama/train", json=body))["run_id"]) put_concept_map(api, "erick_site") ok(api.put("/ingest/pipelines/site", json=json.loads(site.drawn))) run(api, "site") diff --git a/webapi/models.py b/webapi/models.py index af7cc03..058b92c 100644 --- a/webapi/models.py +++ b/webapi/models.py @@ -84,7 +84,7 @@ def promote(domain: Domain, name: str, version: int) -> dict: class Training(BaseModel): as_of: date | None = None # the date the data are taken up to (default: today) - models: list[str] = [] # which (default: all but the slow ones, like CaMa's recurrence) + models: list[str] = [] # which (default: every model of the domain) def _submit(client: DagsterGraphQLClient, job: str, op: str, config: dict) -> dict[str, str]: