Skip to content

datalets 0.9.0 — the methodology release

Choose a tag to compare

@nashit8421 nashit8421 released this 29 Jul 12:56

The five deep items from production feedback, plus an adversarial-review hardening pass.

Features

  • Pluggable CV + groupscv= accepts any sklearn splitter (GroupKFold, StratifiedGroupKFold, TimeSeriesSplit, …) and fit(groups=) flows into every tournament, global and per-cluster. The OOF engine uses explicit coverage masks, so non-partition splitters exclude uncovered rows from every statistic on both arms of every comparison.
  • threshold_objective — operate on constraints instead of a metric argmax: ("precision_at_recall", 0.35), ("recall_at_precision", 0.8), ("cost", {"fp": 1, "fn": 5}), ("flag_rate", 0.02) (rank-based, exact by construction; small batches fall back to the fitted OOF-quantile cutoff).
  • missing= policy"error" | "median" | "sentinel", applied once to the single view every component sees; serving-time NaN imputes with the same fitted transform.
  • Checkpoint/resume (checkpoint_dir=) — every (slice, candidate) scoring cached under a content-hash key (data + hyperparameters + CV + groups + objective + version); preempted fits resume instead of restarting. Works with the default random_state=None via a seed pinned to the cache directory.
  • MLflow flavor (pip install datalets[mlflow]) — save_model / log_model / load_model via pyfunc, with the report, tree and segment narration logged as artifacts.

Hardening

An 18-agent adversarial review confirmed 11 findings; all are fixed with regression tests — see CHANGELOG.md for the full list. Highlights: constraint cutoffs are computed on real counts even under class_weight; a cluster slice the splitter cannot split falls back to the validated global model; overlapping-fold splitters are rejected; typo'd cost keys raise instead of silently deploying cost-neutral cutoffs.

581 passed, 13 xfailed, 4 xpassed.