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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user