Skip to main content

Introduction

Microsoft Fabric MLflow Plugin

This is a preview version of the MLflow plugin that connects the Python MLflow library to Fabric MLflow endpoints via its entry-points registry. When the MLflow tracking URI is set to start with sds://, this plugin is activated and uses Fabric MLflow backend services as the MLflow tracking store.

Dependencies

Fabric officially supports MLflow 2.x. While support for MLflow 3 is in progress, please install MLflow or mlflow-skinny 2.x in your development or Fabric Notebook environment for now.

Setup

Fabric Notebook

%pip install "synapseml-mlflow[online-notebook]>=2.0.3"

Don't forget the % prefix, which ensures the package is updated on all Spark driver and worker nodes at the same time.

In a Fabric Notebook, the MLflow tracking URI is set by default to the home Fabric workspace of your notebook. For example:

sds://api.fabric.microsoft.com/v1/workspaces/3aa8fea3-42f6-4326-924c-8ea8f9bd715f/mlflow

There is no need to set the tracking URI manually if you only want to log models to the same workspace. It is configured automatically, and private-link conditions are handled as well.

To log to a different workspace, simply change the workspace ID in the tracking URI.

import os

os.environ["MLFLOW_TRACKING_URI"] = "sds://api.fabric.microsoft.com/v1/workspaces/deeb59d0-8608-447c-98f3-09408a20cfe0/mlflow"

Other Environments

The optional online-notebook dependencies are not required:

pip install synapseml-mlflow

You must set the tracking URI first so the plugin knows your workspace ID. The URI format is the same as in a Fabric Notebook.

You must also configure credentials beforehand. Here is a complete example:

from azure.identity import ( 
    ClientSecretCredential, 
    DefaultAzureCredential, 
    DeviceCodeCredential, 
    InteractiveBrowserCredential,
) 

from fabric.analytics.environment.credentials import SetFabricAnalyticsDefaultTokenCredentialsGlobally

# Choose any credential type and register it with the Fabric Analytics SDK
SetFabricAnalyticsDefaultTokenCredentialsGlobally(InteractiveBrowserCredential())

import os

os.environ["MLFLOW_TRACKING_URI"] = "sds://api.fabric.microsoft.com/v1/workspaces/3aa8fea3-42f6-4326-924c-8ea8f9bd715f/mlflow"

import mlflow

mlflow.set_experiment("mlflow-experiment-1")

Workspace Private Link (WSPL)

If the target Fabric workspace has an inbound restriction, or your current workspace has an outbound restriction, you need to set the tracking URI host to the WSPL-specific FQDN. The format is shown below, where 3aa8fea3-42f6-4326-924c-8ea8f9bd715f is the workspace ID:

sds://3aa8fea342f64326924c8ea8f9bd715f.z3a.w.api.fabric.microsoft.com/v1/workspaces/3aa8fea3-42f6-4326-924c-8ea8f9bd715f/mlflow

Alternatively, you can let the Fabric Analytics SDK print the FQDN for you:

from fabric.analytics.environment.context import FabricContext, InternalContext

context = FabricContext(workspace_id="3aa8fea3-42f6-4326-924c-8ea8f9bd715f", internal_context=InternalContext(is_wspl_enabled=True))
print(context.pbi_shared_host)

Metadata

Release files for synapseml-mlflow 2.0.3.post1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for synapseml-mlflow 2.0.3.post1
File Interpreter ABI Platform Actions
synapseml_mlflow-2.0.3.post1-py3-none-any.whl Python 3 none any Details for synapseml_mlflow-2.0.3.post1-py3-none-any.whl

Release files / synapseml_mlflow-2.0.3.post1-py3-none-any.whl

Download URL synapseml_mlflow-2.0.3.post1-py3-none-any.whl
Size 30.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c7154fc07fd07a725e094c715ff16c0fac09630945d221442f0797f81e8262ed
BLAKE2b-256 checksum
How to use checksums
820401944198b51b6f9b0e02db82728528d1c13adb1c9c69e545f70b515ab8b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Security for synapseml-mlflow 2.0.3.post1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page