Skip to main content

honestml

PyPI CI Python License: MIT

AutoML для табличных данных с прозрачной оценкой качества. honestml разделяет DEV-оценку после выбора модели и оценку на внешнем holdout. Перенос результата на новые данные требует независимой проверки с заранее заданными метрикой и допуском.

It covers binary / multiclass classification and regression behind a clean, extensible core. The honesty is in how it selects: out-of-fold scoring on a shared CV split; a bootstrap equivalence band that, among the statistically indistinguishable best candidates, ships the simplest one; leakage-controlled feature engineering and selection; an optional untouched outer holdout scored exactly once; and reproducible, fingerprinted runs.

from honestml import AutoML

model = AutoML(task="binary").fit(X, y)
proba = model.predict_proba(X_new)
print(model.best_model_id_, model.leaderboard_)

The library is silent by default (a NullHandler on the honestml logger); enable progress with logging.getLogger("honestml").setLevel(logging.INFO) plus logging.basicConfig().

Install

pip install honestml                 # lightweight core (baseline/linear models)
pip install "honestml[boosting]"     # core + catboost, lightgbm, xgboost
pip install "honestml[all]"          # boosting + optuna (HPO), mlflow (tracking), onnx, shap, report and the rest
pip install "honestml[inference]"    # slim serving runtime (load_artifact + predict only)

Requires Python >= 3.10. Heavy dependencies are optional extras and imported lazily — import honestml stays light, and a missing extra fails fast with the exact pip install honestml[...] hint.

The default zoo (models=None) is baseline + linear + catboost + lightgbm. xgboost ships with [boosting] but is opt-in (models=("xgboost", ...)) — it does not earn its CV/HPO budget over catboost/lightgbm on the honesty benchmarks.

What you get

Capability How
Honest model selection OOF scoring on a shared CV split; a seeded bootstrap equivalence band (significance="bootstrap", the default) collects candidates statistically indistinguishable from the best, and the simplest member of the band wins — ties are disclosed, not hidden
CV schemes stratified / kfold / group / holdout / timeseries (purge+embargo, value-based time order) / timeseries_period (calendar or Δt period folds, wall-clock gaps, optional per-period weighting, rolling train window) — fit(..., time=, label_time=, groups=)
Outer holdout + finalize cv=CVConfig(outer_holdout=0.2): selection sees only DEV, the holdout is scored once; the shipped model is refit on all data after scoring (finalize=True)
Presets AutoML(preset="fast" / "balanced" / "best") — declarative, data-driven partial configs; an explicit argument always wins; honesty parameters are not presettable
Budget + resume budget=600 — кооперативный бюджет; cache="runs/" переиспользует совместимые завершённые результаты
Ограниченный поиск search=SearchConfig(...) — пробы семейств, ограниченный FS и широкий контроль; стоимость и границы прогноза
Feature engineering / selection OOF-honest target (binary-only) / frequency encoding, datetime deltas, intersections; importance / null-importance / random-probe / sequential / SHAP selection with an importance-ordered refinement cascade (default) and honest arbitration
HPO + ensembling hpo=HPOConfig(...) (Optuna, per-model search before the honest selection); ensemble=EnsembleConfig() — a Caruana/weighted blend ships only if significantly better
Run report model.run_report_ (versioned JSON, tracker-independent); save_run_report and render_report produce markdown or self-contained HTML (charts via the report extra)
Experiment tracking tracker="mlflow" or TrackerConfig(...) — post-fit, fail-soft, no global mlflow state; custom backends via the ExperimentTracker port
Artifacts + serving save_artifact / load_artifact — versioned, integrity-checked artifact directory (see Standalone inference below)
ONNX export honestml.export_onnx(model, dir, sample=...) — parity-gated, export-only bundle for external runtimes
Plugins third-party models via honestml.models entry points (docs/plugin-contract.md)

Standalone inference

from honestml import load_artifact

model = load_artifact("artifact_dir/")   # integrity-checked against the sha256 manifest
predictions = model.predict(X_new)

The artifact directory is self-contained — manifest, preprocessing schema and the model body — and loads under the slim honestml[inference] install: no training stack is imported. Boosting models can be saved with structural native bodies (model_format="native"). Trust model: the default body is joblib/pickle — load only artifacts you trust; native bodies contain no pickle (a non-boosting estimator and the optional calibrator still ship as joblib).

Reproducibility

Каждый запуск вычисляет fingerprint по разрешённой конфигурации, данным, каталогу моделей и версиям библиотек. Отчёт сохраняет этот контекст вместе с решениями FS/HPO/ансамбля и выполненной работой. Таймауты HPO и ресурсные ограничения могут изменить объём завершённой работы и итог при том же fingerprint.

Documentation

Documentation lives in docs/ — quickstart, API reference, correctness guide and the plugin contract; build it locally with mkdocs serve. Source and issue tracker: https://github.com/sukhov-is/HonestML.

Development

uv sync --extra dev --extra boosting --extra shap --extra pyarrow --extra mlflow
uv run pytest                 # full suite (onnx export tests also need `--extra onnx`, Python >=3.11)
uv run ruff check src tests; uv run mypy src/honestml; uv run lint-imports

The layered architecture (core ← adapters ← application ← composition) is enforced by import-linter. See docs/releasing.md for the release pipeline and benchmarks/ for the honesty benchmark suite.

License

MIT (see LICENSE).

Metadata

Release files for honestml 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for honestml 2.0.0
File Size Uploaded
honestml-2.0.0.tar.gz 237.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for honestml 2.0.0
File Interpreter ABI Platform
honestml-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 504.4 kB

Release files / honestml-2.0.0.tar.gz

Download URL honestml-2.0.0.tar.gz
Size 237.7 kB
Tags Source
SHA-256 checksum
How to use checksums
553ef29109984f50d5a0083e6c2353bc72db76b59261c906099b70d7dd225b11
BLAKE2b-256 checksum
How to use checksums
4212fa81daaa323adbf58de0a0a93fd2909614b14aeed9ea426d71ce721022f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.

Transparency log

Release files / honestml-2.0.0-py3-none-any.whl

Download URL honestml-2.0.0-py3-none-any.whl
Size 266.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fe49ab0f96a023a9124c78b76d4fe8aa316091441c43c869112a24f4f9fe22b5
BLAKE2b-256 checksum
How to use checksums
033f0156b31f4cd8308068f9fae457d6f2a0f4c05b8f03364ca6bd69c9658993
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page