What changed in PyCaret 3.0.0

PyCaret is an open-source, low-code machine learning library for Python that wraps scikit-learn and other libraries behind a few functions such as setup, compare_models and tune_model. Version 3.0.0, released in March 2023, was a major rewrite with breaking changes. The release notes warn that PyCaret 2 code will most likely not run without changes.
What’s new
Section titled “What’s new”- Time series forecasting module.
pycaret.time_seriesgives forecasting the same compare-and-tune workflow as classification and regression. - Object-oriented API. Each module now has an experiment class (
ClassificationExperiment,RegressionExperiment, and so on) that can be used alongside the older functional API. This lets you run several experiments in the same Python session without them sharing global state. - Reworked preprocessing. Preprocessing was rebuilt around pipelines, and cross-validation applies those pipelines inside each fold, which prevents target leakage from steps like imputation or scaling seeing the validation data.
- Experiment logging with MLflow, Weights & Biases, DagsHub and Comet ML.
- Distributed execution through Fugue, so functions like
compare_modelscan run across Spark or Dask. - Optional Intel Extension for scikit-learn (scikit-learn-intelex) as an engine for faster training on CPUs.
- Compatibility with the then-current scikit-learn release.
Breaking changes
Section titled “Breaking changes”Besides the API changes, the NLP and association rules (arules) modules were removed. If you depended on them, stay on PyCaret 2.x or move that work to a dedicated library.
Functional vs object-oriented API
Section titled “Functional vs object-oriented API”Both styles below do the same thing. The functional version keeps the experiment in module-level state; the object-oriented version keeps it on exp:
from pycaret.datasets import get_datafrom pycaret.classification import ClassificationExperiment, setup, compare_models
data = get_data("diabetes")
# Functional APIsetup(data, target="Class variable", session_id=123)best = compare_models()
# Object-oriented APIexp = ClassificationExperiment()exp.setup(data, target="Class variable", session_id=123)best_oop = exp.compare_models()Installing
Section titled “Installing”pip install -U pycaret # core dependenciespip install -U "pycaret[full]" # all optional dependenciesAs of this update the latest release on PyPI is 3.3.2 (April 2024), which supports Python 3.9 to 3.11. If you’re on a newer Python, create a separate virtual environment with 3.11 for PyCaret.
Further reading
Section titled “Further reading”© 2026 David Li · Home · Blog · RSS ·Classic site · Built with Astro, Starlight and three.js · Logos:Font Awesome Free (CC BY 4.0)