Skip to content

v0.2.4

Choose a tag to compare

@github-actions github-actions released this 07 Oct 23:03
· 40 commits to main since this release
Immutable release. Only release title and notes can be modified.
7ca02f1

hessboost v0.2.4

Patch release: single-row prediction that never enters rayon, public read-only model metadata, cross-validation continuation and refit, EBM eval sets with round-level early stopping, and a Python extension pool that survives fork. No breaking changes.

Full Changelog: v0.2.3...v0.2.4

Highlights Since v0.2.3

Prediction

  • Prediction transforms are scalar on every platform again, so predict is bit for bit the transform of predict_margin — a row predicted alone matches the same row inside a batch.
  • New Rust row API: predict_row, predict_row_into, their margin forms, transform_margin / transform_margins_into, and predict_rows over borrowed rows. All match predict on a DMatrix bit for bit, allocate nothing, and never enter rayon — so a forked Python child still predicts rows.
  • Read-only model metadata: BoostedModel::tree_weights(), num_class(), linear(), shrinkage(), and RegTree::split_categories(nid).

Training

  • CrossValidation::init_model continues a model in every fold; target_stats_label sets the per-row target per-fold target statistics are fitted on; refit() returns a CvRefit retrained on every row at the chosen round.
  • EBM eval sets and early stopping: a classic EBM now stores its trees round by round, so each round's eval score is bit for bit the model through that round; early stopping cuts the model back to the best round. Multi-bag EBM predictions can differ from 0.2.3's at f32 rounding level.
  • linear_tree now trains with reg:absoluteerror and reg:quantileerror.

Data

  • DMatrix clones share feature storage through Arc (copy-on-write), dense input is checked and copied in parallel, and from_dense_vec is public. from_dense 1M × 100 is about 2× faster; a clone with new labels about 48×.

Python bindings

  • The extension runs rayon work on its own process-local pool, rebuilt in a forked child — the child of a process that already trained no longer hangs.
  • Booster.predict_row(row, *, output_margin=False, iteration_range=None, missing=nan, out=None) and Booster.transform_margin / transform_margins(margins, *, out=None); predict on a plain 2-D numeric numpy array reads it in place instead of building a DMatrix.
  • Booster.model_info() returns frozen dataclasses with the model's layout, tree weights, node arrays, gblinear and shrinkage records.
  • cv(..., target_stats_label=, xgb_model=, refit=True) returns a frozen CvRefit; FittedTargetEncoder gains to_bytes / from_bytes / save / load and pickle support.
  • EBM train(evals=..., early_stopping_rounds=...) and cv work end to end.

Pull Requests by Category

Features

  • feat: single-row prediction, model metadata, cv refit, EBM early stopping, fork-safe Python pool (#150)

Bug Fixes

  • fix(python): run a callback's hooked call inline on the pool thread (#151)
  • fix(python): admit online updates before scheduling their work (#152)

Misc