Skip to content

Releases: nashit8421/datalets

datalets 1.0.2 — documentation consistency

Choose a tag to compare

@nashit8421 nashit8421 released this 30 Jul 08:03

Documentation-consistency release, no behavior changes: README now covers the full 1.0 surface (temporal/grouped CV incl. explicit folds, operating-point objectives, missing= policies, checkpoint/resume + estimate_cost, MLflow flavor, multi-scale ensembles); API-reference signature blocks and parameter tables are programmatically verified against the real signatures; the cv docs document the explicit-folds form and the automatic groups upgrade; added the Production/Stable trove classifier. Every python block in README and DOCUMENTATION executes as written.

datalets 1.0.1 — zero unexplained test debt

Choose a tag to compare

@nashit8421 nashit8421 released this 30 Jul 07:36

Follow-up hardening on 1.0: every remaining non-pass in the test suite is now either fixed or precisely attributed to a documented design decision.

  • cv= accepts explicit (train, test) splits — sklearn's third cv form (any iterable of index pairs, including generators) works on all estimators and honest_cv: materialized once, bounds-checked with a clear error, remapped to each cluster slice's rows, and content-hashed into checkpoint keys. Previously this form crashed.
  • Three estimators now pass check_estimator with no exemptions at all (TournamentClassifier, TournamentRegressor, PartitionedRegressor). The former 17 blanket exemptions (4 silently stale) are now 10, scoped per estimator to two documented design decisions: tuned thresholds are not argmax (the same exemption scikit-learn grants its own TunedThresholdClassifierCV), and X-only clustering is unweighted by design.

614 passed, 10 xfailed, 0 xpassed.

datalets 1.0.0 — the stability release

Choose a tag to compare

@nashit8421 nashit8421 released this 30 Jul 03:57

datalets is 1.0: a stable, production-hardened API for partition-then-fit machine learning.

No new surface in this release — 1.0 is the outcome of a rigorous pre-release audit. A 32-agent adversarial review swept eight dimensions (scikit-learn contract, serialization, statistical validity, degenerate inputs, concurrency, documentation truthfulness, API ergonomics, property-based fuzzing), and every finding was independently re-verified with a mandatory reproduction before being fixed. 21 code defects and 3 documentation defects fixed; every code fix carries a regression test.

Highlights

  • Group safety everywhere: fit(groups=) with the default integer cv now upgrades to a group-aware splitter per slice — previously groups were silently ignored and identity leakage went undetected (0.945 leaked → 0.71 honest OOF F1 on a group-memorisable benchmark).
  • Honest statistics: fold-score standard errors now use the sample standard deviation (ddof=1); the previous ddof=0 understated every SE (and narrowed the one-SE simplicity band) by 10–18% at typical fold counts.
  • Exception-safe fit state: all six estimators leave themselves properly unfitted when a fit raises — no more silently mislabeled predictions after a caught refit failure — and a failed fit stops the progress heartbeat instead of printing "still working" forever.
  • Ensemble parity: DataletEnsemble* now pass through groups=, accept NaN when members impute (missing=), and honor a member flag_rate objective on the blended probabilities.
  • Hardened checkpointing: structurally-wrong cache entries cost one recompute instead of crashing; keys include the sklearn/numpy versions so cached scorings never survive an ML-stack upgrade.
  • Clear errors for every foreseeable misuse: multiclass + threshold_objective, cv < 2, unknown metrics under clusterer="auto", empty candidate lists, string regression targets, zero/negative sample weights, bare-string exclude_candidates, unaffordable auto grids — all raise a named ValueError instead of crashing later or passing silently.
  • Docs you can execute: every Python block in README and DOCUMENTATION runs as written; preset tables and parameter lists verified against the code.

602 passed, 13 xfailed, 4 xpassed. See CHANGELOG.md for the complete list.

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.

datalets v0.8.0 — know before, not during

Choose a tag to compare

@nashit8421 nashit8421 released this 29 Jul 10:17

Trust and pre-flight tooling from production field feedback:

  • estimate_cost(X, y) — the pre-flight plan: candidates and partition configs timed on a small subsample, extrapolated by complexity, printed before anything expensive runs. The 30-hour configuration is visible up front.
  • search_sample=50_000 — the auto partition search ranks configs on a stratified subsample above 50k rows and refits only the winner on full data (~10× cheaper at 500k).
  • cv_score_se in report() — fold-level uncertainty next to every specialist score: lift under ~2× the SE is noise, not signal.
  • segment_stability(X_new) — per-cluster share drift + PSI on new data: the trust check for temporal splits where partitions latch onto time-varying structure.
  • env_ — library-version fingerprint on every fitted object, shown in tree(). Models that carry their own provenance.
  • Docs: the large-data playbook — what to do before pressing go at 100k+ rows or 100+ features.

522 tests. CHANGELOG.md

datalets v0.7.0 — big-data controls

Choose a tag to compare

@nashit8421 nashit8421 released this 29 Jul 10:00

Controls born from a real 503k × 499 fit:

  • Custom k grid: clusterer="kmeans", n_clusters=[4, 8] — the utility-scored search over exactly those configs. Combines with clusterer lists and "auto".
  • exclude_candidates=["knn"]: keep a preset, drop a model. Typos warn instead of crashing an hours-long fit; excluding everything raises immediately.
  • pca_components= (int or variance fraction): PCA-reduce the partition space — clustering/routing/silhouette in the reduced space, candidate models keep every feature. Recommended on wide data.
  • Wide-data GMM handling: auto search switches mixtures to diagonal covariance above 100 features (full covariance is O(d²) per component per EM iteration); a named "gmm" warns instead of silently changing your choice.
  • Advisory size limits added to knn (quadratic OOF scoring) and random_forest/extra_trees (multi-hour candidates at large n).

508 tests. CHANGELOG.md

datalets v0.6.0 — long fits are never blind

Choose a tag to compare

@nashit8421 nashit8421 released this 29 Jul 07:59

Big-data fits used to go dark for hours outside a terminal. No more:

  • Per-task lines in plain mode (logs, CI, servers, captured notebooks): [37/104] cluster 4 · xgboost · stage 12m08s, throttled to stay log-friendly.
  • Heartbeat: after 30 quiet seconds — ⏳ still working · stage elapsed 1h02m · 96/104 tasks done · waiting on global · random_forest — naming the exact task blocking the stream.
  • Live bar now shows stage-elapsed time on every frame; clusterer="auto" narrates each config it tries.
  • Selectable auto-search algorithms: clusterer=["kmeans", "gmm", "birch"] runs the utility-scored search over exactly those — the way to skip slow density-based clusterers on large data.

491 tests. CHANGELOG.md

datalets v0.5.2 — packaging fix + docs refresh

Choose a tag to compare

@nashit8421 nashit8421 released this 27 Jul 10:05

Packaging fix: the scikit-learn requirement was declared >=1.4 but the code needs >=1.6 (validate_data) — installs on sklearn 1.4/1.5 failed at import. If you're on an older scikit-learn, pip install -U scikit-learn datalets.

Also a documentation de-staling pass: six estimators in the compatibility section, all three check_estimator exemptions listed with their shared tuned-threshold cause, sample_weight/class_weight support properly reflected, API signatures and fitted attributes brought current.

datalets v0.5.1 — automated imbalance handling

Choose a tag to compare

@nashit8421 nashit8421 released this 27 Jul 09:15

class_weight="balanced" (sklearn-style, also accepts a dict): automated imbalance handling without resampling — inverse-frequency weights flow through candidate fitting, cross-fitted threshold tuning, scoring and reports.

Two automated operating modes for imbalanced data, benchmarked (german credit 30%, adult 25%, covtype 0.4% positives vs HistGB ± balanced and XGBoost scale_pos_weight):

  • plain (per-cluster thresholds only) — F1-first: wins on heterogeneous german credit, parity with tuned boosters elsewhere;
  • class_weight="balanced" — recall-first: 97% recall and ROC-AUC 0.999 at 0.4% positives.

Quickstarts now lead with the fully automatic configuration (clusterer="auto", class_weight="balanced"). 483 tests. Full table in DOCUMENTATION.md.

datalets v0.5.0 — pip install datalets

Choose a tag to compare

@nashit8421 nashit8421 released this 27 Jul 08:29

datalets — partition-then-fit machine learning. Cluster your data into datalets, run a model tournament per datalet, route every prediction to the right specialist. Many tiles, one picture.

pip install datalets            # import datalets

First release on PyPI, and a complete rebrand: one name everywhere (formerly developed as MOSAIC — renamed after a PyPI normalized-name collision with the unrelated mosaicml/Composer package).

  • PartitionedClassifier / PartitionedRegressor: X-only clustering (12-clusterer zoo + inductive KNN-gate router), stratified-CV model tournaments per cluster (scikit-learn + XGBoost/LightGBM/CatBoost candidates), cross-fitted per-cluster thresholds, soft/hard routing, tournament-selected global fallback, and an honesty report that says when partitioning is NOT worth it.
  • TournamentClassifier / TournamentRegressor (model selection standalone), DataletEnsembleClassifier / DataletEnsembleRegressor (ensemble across partition scales).
  • clusterer="auto" with silhouette/BIC diagnostics and a fewest-clusters tie-break, sample_weight everywhere, calibrated routing gate, narrated fits with a live progress bar and the tree() finish tree, honest_cv leakage-free evaluation, DATALETS_QUIET=1 to silence it all.
  • 478 tests, scikit-learn check_estimator compliant (6 estimators), hardened by two adversarial reviews. Fully offline.

Docs: DOCUMENTATION.md · CHANGELOG.md