Fabric Features in Public Python
FLAML 3.0 brings previously Fabric-only functionality into the public library. The same implementation serves ordinary Python environments and Microsoft Fabric Data Science. You do not need a Fabric workspace to use AutoFE, pipeline export, or visualization.
What's new since 2.8.0
- Fabric feature consolidation: opt-in tunable feature engineering, exportable pipelines, expanded AutoML/Tune MLflow tracking, interactive plots and fANOVA hyperparameter importance, and improvements to distributed tuning, forecasting, and trial-failure handling.
- Python 3.14 and Spark 4.2/4.3 support,
including the compatible
joblibspark-fabricbackend on Python 3.14+. - Early binary-target validation: explicit binary tasks reject targets without exactly two observed classes before starting search.
- Fabric diagnostic compatibility: legacy logging formats remain compatible with existing Kusto consumers.
- API documentation corrections, CI runtime fixes, and dependency updates.
See the complete comparison with 2.8.0 for the merged changes. For environment changes, see the upgrade notes.
Choose optional dependencies
For tunable feature engineering without MLflow or Spark:
pip install "flaml[autofe]"
For AutoFE, MLflow, and visualization in a Python environment without Spark:
pip install "flaml[fabric_python]"
For the Spark profile, use flaml[synapse]. The base flaml package still
requires only NumPy, and flaml[automl] does not require Fabric services,
MLflow, or Spark. See Installation for all profiles.
Tunable feature engineering and pipeline export
AutoFE is off by default, including in Fabric. Set featurization="auto"
to tune feature engineering along with model hyperparameters, or "force" to
require a feature-engineering method at each stage. An explicit setting takes
precedence over the FLAML_FEATURIZATION environment variable.
import numpy as np
from sklearn.datasets import load_diabetes
from sklearn.model_selection import train_test_split
from flaml import AutoML
X, y = load_diabetes(return_X_y=True, as_frame=True)
X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=42)
automl = AutoML(featurization="auto", mlflow_logging=False)
automl.fit(
X_train,
y_train,
task="regression",
estimator_list=["rf"],
max_iter=4,
n_jobs=1,
seed=42,
)
pipeline = automl.automl_pipeline
np.testing.assert_allclose(pipeline.predict(X_test), automl.predict(X_test))
automl_pipeline is a detached, fitted scikit-learn-compatible snapshot that
includes task preprocessing and feature engineering. Refitting the snapshot
does not change the source AutoML instance. It is available for models fitted
with AutoFE; it returns None when the fitted model has no AutoFE.
Use automl.feature_transformer for the detached feature-only pipeline.
Feature engineering and its preprocessing are fitted on training partitions, separately for each cross-validation fold, rather than held-out data. Spark learners, sparse inputs, NLP, panel/TFT forecasting, and ensembles have AutoFE exclusions. See the runtime contracts for the supported combinations and refitting limitations.
MLflow and visualization
With flaml[fabric_python] installed, use an active MLflow run or enabled
autologging to collect AutoML trial history outside Fabric. Installing MLflow
or setting model_history=True alone does not enable that history.
import mlflow
from sklearn.datasets import load_diabetes
from flaml import AutoML
from flaml.automl import register_automl_pipeline
from flaml.visualization import plot_optimization_history
X, y = load_diabetes(return_X_y=True, as_frame=True)
mlflow.set_experiment("flaml-3-quickstart")
with mlflow.start_run():
automl = AutoML(featurization="auto")
automl.fit(
X,
y,
task="regression",
estimator_list=["rf"],
max_iter=4,
n_jobs=1,
seed=42,
)
model_version = register_automl_pipeline(automl, model_name="diabetes-pipeline")
figure = plot_optimization_history(automl)
figure.show()
Configure an MLflow tracking store and model registry appropriate for your
environment before running the example. Registration logs the current fitted
pipeline, even when model history is disabled; it requires AutoFE and MLflow.
An autologging log_models=False setting suppresses automatic model artifacts,
but an explicit register_automl_pipeline() call still registers the pipeline.
flaml.visualization also provides feature-importance, parallel-coordinate,
contour, slice, timeline, empirical-distribution, and parameter-importance plots.
Parameter importance uses fANOVA and requires enough completed trials with
varying scores. See the
plotting example and limitations.
For parallel MLflow tracking with native Ray, use a transactional store such as SQLite for local workers, or a reachable tracking server for multi-host clusters. File-based tracking is rejected for native Ray; it remains available for non-Ray workloads.
Runtime defaults and opt-outs
FLAML detects Fabric from its notebook marker or Spark runtime context file, without starting Spark or contacting a service. Installing PySpark or SynapseML alone does not enable Fabric defaults.
Outside Fabric, model history defaults to False. Inside Fabric it defaults
to True, and MLflow, when installed, also supports trial-history collection.
History-only collection without an active run or autologging stays in memory;
it does not configure an experiment or contact Fabric services.
Explicit options override runtime defaults: model_history=False avoids
retaining intermediate models, and mlflow_logging=False disables FLAML's MLflow
integration in both AutoML and tune.run().
Set FLAML_FABRIC_RUNTIME before importing FLAML to select auto (default),
true/1 (Fabric defaults), or false/0 (public defaults).
The override does not emulate Fabric services or configure credentials.
See the full runtime contracts
for logging, telemetry, pipeline, and distributed-execution details.