flaml 2.5.0


pip install flaml

  Latest version

Released: Jan 21, 2026

Project Links

Meta
Author: Microsoft Corporation
Requires Python: >=3.10

Classifiers

License
  • OSI Approved :: MIT License

Operating System
  • OS Independent

Programming Language
  • Python :: 3
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12

PyPI version Conda version Build PyPI - Python Version Downloads

A Fast Library for Automated Machine Learning & Tuning


:fire: FLAML supports AutoML and Hyperparameter Tuning in Microsoft Fabric Data Science. In addition, we've introduced Python 3.11 and 3.12 support, along with a range of new estimators, and comprehensive integration with MLflow—thanks to contributions from the Microsoft Fabric product team.

:fire: Heads-up: AutoGen has moved to a dedicated GitHub repository. FLAML no longer includes the autogen module—please use AutoGen directly.

What is FLAML

FLAML is a lightweight Python library for efficient automation of machine learning and AI operations. It automates workflow based on large language models, machine learning models, etc. and optimizes their performance.

  • FLAML enables economical automation and tuning for ML/AI workflows, including model selection and hyperparameter optimization under resource constraints.
  • For common machine learning tasks like classification and regression, it quickly finds quality models for user-provided data with low computational resources. It is easy to customize or extend. Users can find their desired customizability from a smooth range.
  • It supports fast and economical automatic tuning (e.g., inference hyperparameters for foundation models, configurations in MLOps/LMOps workflows, pipelines, mathematical/statistical models, algorithms, computing experiments, software configurations), capable of handling large search space with heterogeneous evaluation cost and complex constraints/guidance/early stopping.

FLAML is powered by a series of research studies from Microsoft Research and collaborators such as Penn State University, Stevens Institute of Technology, University of Washington, and University of Waterloo.

FLAML has a .NET implementation in ML.NET, an open-source, cross-platform machine learning framework for .NET.

Installation

The latest version of FLAML requires Python >= 3.10 and < 3.14. While other Python versions may work for core components, full model support is not guaranteed. FLAML can be installed via pip:

pip install flaml

Minimal dependencies are installed without extra options. You can install extra options based on the feature you need. For example, use the following to install the dependencies needed by the automl module.

pip install "flaml[automl]"

Find more options in Installation. Each of the notebook examples may require a specific option to be installed.

Quickstart

from flaml import AutoML

automl = AutoML()
automl.fit(X_train, y_train, task="classification")
  • You can restrict the learners and use FLAML as a fast hyperparameter tuning tool for XGBoost, LightGBM, Random Forest etc. or a customized learner.
automl.fit(X_train, y_train, task="classification", estimator_list=["lgbm"])
from flaml import tune

tune.run(
    evaluation_function, config={}, low_cost_partial_config={}, time_budget_s=3600
)
  • Zero-shot AutoML allows using the existing training API from lightgbm, xgboost etc. while getting the benefit of AutoML in choosing high-performance hyperparameter configurations per task.
from flaml.default import LGBMRegressor

# Use LGBMRegressor in the same way as you use lightgbm.LGBMRegressor.
estimator = LGBMRegressor()
# The hyperparameters are automatically set according to the training data.
estimator.fit(X_train, y_train)

Documentation

You can find a detailed documentation about FLAML here.

In addition, you can find:

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

If you are new to GitHub here is a detailed help source on getting involved with development on GitHub.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Contributors Wall

2.5.0 Jan 21, 2026
2.4.1 Jan 13, 2026
2.4.0 Jan 10, 2026
2.3.6 Aug 15, 2025
2.3.5 May 28, 2025
2.3.4 Feb 17, 2025
2.3.3 Dec 18, 2024
2.3.2 Nov 01, 2024
2.3.1 Sep 22, 2024
2.3.0 Sep 19, 2024
2.2.0 Aug 08, 2024
2.1.2 Mar 13, 2024
2.1.1 Oct 02, 2023
2.1.0 Sep 14, 2023
2.0.2 Aug 30, 2023
2.0.1 Aug 28, 2023
2.0.0 Aug 15, 2023
2.0.0rc5 Aug 09, 2023
2.0.0rc4 Aug 04, 2023
2.0.0rc3 Jul 10, 2023
2.0.0rc2 Jun 26, 2023
2.0.0rc1 Jun 09, 2023
1.2.4 May 23, 2023
1.2.3 May 05, 2023
1.2.2 Apr 25, 2023
1.2.1 Apr 17, 2023
1.2.0 Apr 08, 2023
1.1.3 Mar 01, 2023
1.1.2 Feb 06, 2023
1.1.1 Jan 08, 2023
1.1.0 Dec 30, 2022
1.0.14 Nov 16, 2022
1.0.13 Oct 13, 2022
1.0.12 Sep 06, 2022
1.0.11 Aug 21, 2022
1.0.10 Aug 16, 2022
1.0.9 Jul 31, 2022
1.0.8 Jul 10, 2022
1.0.7 Jun 17, 2022
1.0.6 Jun 09, 2022
1.0.5 Jun 07, 2022
1.0.4 Jun 02, 2022
1.0.3 May 31, 2022
1.0.2 May 20, 2022
1.0.1 Apr 24, 2022
1.0.0 Mar 31, 2022
0.10.0 Mar 03, 2022
0.9.7 Feb 12, 2022
0.9.6 Jan 31, 2022
0.9.5 Jan 17, 2022
0.9.4 Jan 08, 2022
0.9.3 Jan 04, 2022
0.9.2 Dec 26, 2021
0.9.1 Dec 18, 2021
0.9.0 Dec 07, 2021
0.8.2 Dec 04, 2021
0.8.1 Nov 28, 2021
0.8.0 Nov 23, 2021
0.7.1 Nov 08, 2021
0.7.0 Nov 04, 2021
0.6.9 Oct 20, 2021
0.6.8 Oct 19, 2021
0.6.7 Oct 11, 2021
0.6.6 Oct 09, 2021
0.6.5 Sep 26, 2021
0.6.4 Sep 20, 2021
0.6.3 Sep 11, 2021
0.6.2 Sep 05, 2021
0.6.1 Sep 04, 2021
0.6.0 Aug 24, 2021
0.5.12 Aug 12, 2021
0.5.11 Aug 03, 2021
0.5.10 Jul 28, 2021
0.5.9 Jul 25, 2021
0.5.8 Jul 21, 2021
0.5.7 Jul 11, 2021
0.5.6 Jul 06, 2021
0.5.5 Jul 06, 2021
0.5.4 Jun 19, 2021
0.5.3 Jun 16, 2021
0.5.2 Jun 08, 2021
0.5.1 Jun 05, 2021
0.5.0 Jun 04, 2021
0.4.1 May 28, 2021
0.4.0 May 22, 2021
0.3.6 May 07, 2021
0.3.5 May 01, 2021
0.3.4 Apr 26, 2021
0.3.3 Apr 22, 2021
0.3.2 Apr 21, 2021
0.3.1 Apr 11, 2021
0.3.0 Apr 08, 2021
0.2.10 Apr 01, 2021
0.2.9 Mar 19, 2021
0.2.8 Mar 06, 2021
0.2.7 Mar 06, 2021
0.2.6 Feb 28, 2021
0.2.5 Feb 23, 2021
0.2.4 Feb 17, 2021
0.2.3 Feb 10, 2021
0.2.2 Feb 06, 2021
0.1.3 Dec 15, 2020
0.1.2 Dec 15, 2020
0.1.0 Dec 04, 2020

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras:
Dependencies:
NumPy (>=1.17)