Registry / ai-ml / pycaret

pycaret

JSON →
library3.3.2pypypiunverified

PyCaret is an open-source, low-code machine learning library in Python that streamlines end-to-end machine learning workflows, from data preparation to model deployment. It is currently at version 3.3.2 and maintains an active release schedule, frequently delivering minor updates for bug fixes and dependency compatibility, alongside significant major releases that introduce new features and breaking API changes. [1, 13, 14, 15]

pip install pycaret
INSTALL
IMPORT
SIG · PYCARET
P
pycaret
ai-mlpythonv3.3.2
Install
—
Import
—
Disk
—
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v3.3.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
4/8 runs
py 3.11
✕ build_error
4/8 runs
py 3.12
✕ build_error
4/8 runs
py 3.13
✕ build_error
✕ build_error
py 3.9
✕ build_error
4/8 runs
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

get_data
✓ from pycaret.datasets import get_data
✗ from pycaret.datasets import get_data

This quickstart demonstrates a typical PyCaret classification workflow using the functional API. It involves loading a dataset, initializing the environment with `setup()`, comparing multiple models with `compare_models()`, making predictions, and saving the best performing model. [1, 7, 10, 11]

import pandas as pd from pycaret.datasets import get_data from pycaret.classification import * # Load a sample dataset data = get_data('diabetes') # Initialize the setup (classification experiment) # Use silent=True for non-interactive environments and session_id for reproducibility clf1 = setup(data=data, target='Class variable', session_id=123, silent=True) # Compare all available models and select the best one best_model = compare_models() # Make predictions on the hold-out set predictions = predict_model(best_model) # Save the trained model pipeline save_model(best_model, 'diabetes_best_pipeline')
Debug
Known issues
breakingPyCaret 3.0 introduced significant API changes, making code written for PyCaret 2.x largely incompatible without modifications. [4, 9]
fix
Refer to the PyCaret 3.x documentation and tutorials for updated API usage. Consider rewriting or adapting existing PyCaret 2.x code.
affects: >=3.0.0
breakingPython 3.7 support was dropped in PyCaret 3.1.0, and Python 3.8 support was dropped in PyCaret 3.3.0. [4]
fix
Ensure your Python environment is running Python 3.9 or newer.
affects: >=3.1.0 (for Python 3.7), >=3.3.0 (for Python 3.8)
breakingThe `deep_check` and `eda` functions were removed in PyCaret 3.1.0 and will raise exceptions if called. [4]
fix
Remove calls to `deep_check()` and `eda()`. Use alternative data exploration or preprocessing methods if needed.
affects: >=3.1.0
gotchaThe `setup()` function is interactive by default, prompting the user for data type confirmation. This can halt execution in non-interactive environments. [1, 10]
fix
For automated scripts, pass `silent=True` to suppress prompts. Always include `session_id` for reproducibility, e.g., `setup(data=data, target='target_col', session_id=123, silent=True)`.
affects: All versions
gotchaPyCaret 3.x has had specific dependency version constraints. For instance, PyCaret 3.0.4 pinned `scikit-learn<1.3.0` and 3.0.1 pinned `numpy<1.24`. While newer PyCaret 3.x versions (e.g., 3.3.0) support `scikit-learn 1.4` and `pandas 2.0`, users might encounter conflicts if not using the latest compatible PyCaret version. [4, 9]
fix
Always install PyCaret in a clean virtual environment. Consult the official documentation for specific dependency requirements for your PyCaret version, or upgrade to the latest PyCaret to benefit from broader dependency support.
affects: Various 3.x versions
gotchaThe behavior and results of `compare_models()` might have changed significantly between PyCaret 3.0.0 and versions >= 3.0.1 due to internal bug fixes affecting model performance evaluation. [18]
fix
If upgrading from 3.0.0, re-evaluate model performance and selection as results may differ. The changes were intended to be bug fixes, leading to more accurate evaluations in later versions.
affects: 3.0.1 - 3.x.x (compared to 3.0.0)
Upgrade
Version history
3.3.2latest on PyPI · released Apr 28, 2024
Audit
Dependencies
pythonrequiredRequires Python 3.9 or later.
Agent activity
40 hits · last 30 days
node
38
OpenAI (training)
1
Resources
pycaret — pip install pycaret · libregistry