sklearn-genetic-opt 0.13.3
This release focuses on making search-space authoring easier, checkpointing safer, errors clearer, and the documentation/release flow cleaner.
Highlights
- Search-space conversion helper:
from_sklearn_spaceconverts commonRandomizedSearchCV-style spaces into nativeInteger,Continuous, andCategoricaldimensions. It supports list-like categorical choices plusscipy.stats.randint,uniform,loguniform, andreciprocalfrozen distributions. - Estimator presets: new starter spaces for
RandomForestClassifier,RandomForestRegressor,HistGradientBoostingClassifier,HistGradientBoostingRegressor,LogisticRegression,SVC,XGBClassifier, andXGBRegressor. Presets supportprofile="fast","balanced", or"wide"and aprefixargument for sklearn pipelines. - Checkpointing fixes:
ModelCheckpointand resume flows now build constructor-compatible estimator state more reliably, includingGAFeatureSelectionCVsupport. - Better validation and error messages across search spaces, plotting helpers, callbacks, MLflow optional dependency handling, and scheduler adapters.
- Docs cleanup: VitePress is now the single docs tree for generated images and release-facing docs.
New Features and Behavior
- Added
from_sklearn_spacefor converting sklearn/scipy-style search spaces into nativesklearn-genetic-optdimensions. - Added estimator preset helpers for common classifiers and regressors, including pipeline-friendly prefixes.
- Added
--use-cache/--no-use-cachetobenchmarks/benchmark_fit.py, threading the option throughGASearchCVandGAFeatureSelectionCVbenchmark builders. - Added clearer successful-save output for
ModelCheckpoint. - Improved internal score ranking utilities to handle
NaNvalues consistently.
Bug Fixes
- Fixed
ModelCheckpointstate generation forGAFeatureSelectionCVand removed duplicateparam_gridstate. - Fixed
random_state=0handling forIntegerandContinuousdimensions. - Fixed
Categoricalpriors being ignored during sampling. - Fixed fitness cache restoration during checkpoint resume.
- Fixed clearer validation for
error_scoreduring estimator construction. - Fixed and improved several plotting helper errors, including invalid
top_k, unavailable metrics, unfitted estimators, and missing history fields. - Improved search-space validation for warm-start configs, unsupported scipy distributions, feature-name count mismatches, preset prefixes, and invalid
param_gridentries. - Improved optional dependency messaging when MLflow is not installed.
Documentation and Maintenance
- Added and expanded documentation for estimator presets, search-space conversion, pipeline preset prefixes, callbacks, troubleshooting, and community articles.
- Added
CITATION.cffand improved README citation guidance, including a BibTeX example. - Added internal Markdown link checking for versioned VitePress docs and root docs links.
- Removed legacy
docs/imagesduplication; generated figures now live underdocs-vitepress/public/images. - Added pre-commit configuration for Black and basic hygiene checks.
- Built and validated release artifacts with
python -m buildandtwine check.
Installation
pip install -U sklearn-genetic-opt==0.13.3Contributors
Huge thanks to everyone who contributed code, tests, docs, reviews, and release polish for this version:
@mayoka0, @delaidam, @kernelpanic888, @xuu33030, @cc1a2b, @andrianbalanesq, @Manabendu-ai, @milekv, @AndyDLi, @KingSylvan, @Ishita-Agrawal03, @isha-1686, @aastha-m22, @sarkarshrayan2-max, @ShiHuiwen-creat, @acm-rgb, and @jordansilly77-stack.