Training defaults to every model of the domain
This commit is contained in:
+3
-1
@@ -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;
|
# Models: one training run gives a version of each, with its two generated reports;
|
||||||
# none is promoted without the clinical validation.
|
# none is promoted without the clinical validation.
|
||||||
current = json.loads((REFERENCE / "models.json").read_text())
|
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"))]
|
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"}
|
assert set(names) == {n for n, m in current.items() if m["status"] == "ok"}
|
||||||
for name in names:
|
for name in names:
|
||||||
|
|||||||
@@ -28,7 +28,8 @@ def test_every_page_loads_from_the_api(api, platform, site):
|
|||||||
drawn.replace("{hospital}", str(HOSPITAL))))) # fmt: skip
|
drawn.replace("{hospital}", str(HOSPITAL))))) # fmt: skip
|
||||||
run(api, domain)
|
run(api, domain)
|
||||||
# A trained CaMa version, unpromoted: what the governance page shows and refuses.
|
# 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")
|
put_concept_map(api, "erick_site")
|
||||||
ok(api.put("/ingest/pipelines/site", json=json.loads(site.drawn)))
|
ok(api.put("/ingest/pipelines/site", json=json.loads(site.drawn)))
|
||||||
run(api, "site")
|
run(api, "site")
|
||||||
|
|||||||
+1
-1
@@ -84,7 +84,7 @@ def promote(domain: Domain, name: str, version: int) -> dict:
|
|||||||
|
|
||||||
class Training(BaseModel):
|
class Training(BaseModel):
|
||||||
as_of: date | None = None # the date the data are taken up to (default: today)
|
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]:
|
def _submit(client: DagsterGraphQLClient, job: str, op: str, config: dict) -> dict[str, str]:
|
||||||
|
|||||||
Reference in New Issue
Block a user