6fbf573999
dev's 1b45bc6 (governance requirements, sandboxed notebooks) was written on the per-scenario driver that this branch
replaced with models.dags; it is carried over in that shape:
- cin2_logistic: the five ML-01a routines (sampling, missing_data, analytic_method, class_balance, output_confidence)
and `routines` are nodes of the scenario's dataflow, on its node names (windowed_outcomes, train_set, test_set,
fitted_pipeline, test_probabilities); `calibration_bins` is a config input with a default.
- io/adapters, dags/training: the saver writes each routine with TrainingRun.log_routine before logging the model;
the driver hands it `routines` when the dataflow has that node. Without it a scenario still trains, but the registry
won't promote it (ROUTINE_KINDS).
- io/tracking: dev's log_routine, run_files and run_file next to this branch's log_model (scikit-learn or pyfunc,
pinned requirements).
- reports/rendering: dev's Quarto and Jupyter renderers (io/rendering.py, followed as a rename) with this branch's
notebook hash; notebook_jobs and experiment import it from there, and cohort_reference and file_sha256 from
io/storage.
- cin2_logistic/train.py: a delegate to models.dags.training for callers of the old driver.
- Persistance's English names from dev: persistance.edges.gold, cohort_repository.
Tests: 219 passed against the monorepo's dev Persistance, Extraction and Core (OCR with tesseract deselected).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HmQxVJVNR5FYkPAregGEQ7
54 lines
1.5 KiB
TOML
54 lines
1.5 KiB
TOML
[project]
|
|
name = "models"
|
|
version = "0.1.0"
|
|
description = "train()/predict() interfaces for the CaCu, CaMa and TEA screening models."
|
|
requires-python = ">=3.11"
|
|
dependencies = [
|
|
"persistance",
|
|
"extraction",
|
|
"mlflow>=2.9",
|
|
# The model DAGs (`models/pipelines`): each function a node, each parameter an edge.
|
|
"apache-hamilton>=1.90",
|
|
# Cohort builds are Parquet files, read and written as frames.
|
|
"pandas>=2.0",
|
|
"pyarrow>=15",
|
|
"scikit-learn>=1.4",
|
|
# The values of the cohort and estimate files (`models.io.contracts`).
|
|
"pandera>=0.20",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
# Running uploaded notebooks without Quarto (models.reports.rendering.JupyterRenderer, models.pipelines.experiment).
|
|
notebooks = [
|
|
"nbclient>=0.10",
|
|
"nbconvert>=7.16",
|
|
"ipykernel>=6.29",
|
|
]
|
|
|
|
[tool.uv.sources]
|
|
persistance = { path = "../Persistance", editable = true }
|
|
extraction = { path = "../Extraction", editable = true }
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["models"]
|
|
exclude = ["**/notebooks"]
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"pytest>=8.0.0",
|
|
"reportlab>=4.0",
|
|
"nbclient>=0.10",
|
|
"nbconvert>=7.16",
|
|
"ipykernel>=6.29",
|
|
]
|
|
# The scenarios' notebooks (`<scenario>/notebooks/`): a Jupyter kernel and the drawing of the Hamilton DAGs.
|
|
# `graphviz` is only the Python side: drawing also needs Graphviz's `dot` program on the machine.
|
|
notebooks = [
|
|
"ipykernel>=6.29",
|
|
"graphviz>=0.20",
|
|
]
|