Models as a dataflow with Hamilton adapters: scenarios declared in model.toml, cohort read from the database or a file, a scikit-learn model registered with its requirements, estimates per horizon, and the CIN2+ prevalence-incidence scenario

This commit is contained in:
2026-11-11 23:27:38 -06:00
parent 6f6c3cd4c2
commit 0d75ff6baa
47 changed files with 2011 additions and 523 deletions
+5 -4
View File
@@ -51,12 +51,13 @@ def test_the_oldest_members_train_and_the_newest_test(labelled):
def test_the_driver_needs_only_the_members_the_predictors_and_the_fraction(labelled):
"""Pins down the dataflow's external inputs: the three required ones; `target_column`, `split_order` and
`max_iter` have defaults. Fails if a node reads a setting from a global or the disk instead of taking it as an
input, or if a new input appears without a default."""
"""Pins down the dataflow's external inputs: the three required ones and `missing_data`, the routine record only
a scenario can write; `target_column`, `split_order`, `max_iter`, `calibration_bins` and `members_left_out` have
defaults. Fails if a node reads a setting from a global or the disk instead of taking it as an input, or if a new
input appears without a default."""
required = {v.name for v in _driver().list_available_variables()
if v.is_external_input and v.originating_functions and not _has_default(v)}
assert required == {"labelled_members", "predictor_columns", "train_fraction"}
assert required == {"labelled_members", "missing_data", "predictor_columns", "train_fraction"}
def _has_default(variable) -> bool: