We are excited to announce the release of MLflow 2.18.0! This release includes a number of significant features, enhancements, and bug fixes.
Python Version Update
Python 3.8 is now at an end-of-life point. With official support being dropped for this legacy version, MLflow now requires Python 3.9 as a minimum supported version.
Note: If you are currently using MLflow's
ChatModel
interface for authoring custom GenAI applications, please ensure that you have read the future breaking changes section below.
Major New Features
-
🦺 Fluent API Thread/Process Safety - MLflow's fluent APIs for tracking and the model registry have been overhauled to add support for both thread and multi-process safety. You are now no longer forced to use the Client APIs for managing experiments, runs, and logging from within multiprocessing and threaded applications. (#13456, #13419, @WeichenXu123)
-
🧩 DSPy flavor - MLflow now supports logging, loading, and tracing of
DSPy
models, broadening the support for advanced GenAI authoring within MLflow. Check out the MLflow DSPy Flavor documentation to get started! (#13131, #13279, #13369, #13345, @chenmoneygithub, #13543, #13800, #13807, @B-Step62, #13289, @michael-berk) -
🖥️ Enhanced Trace UI - MLflow Tracing's UI has undergone a significant overhaul to bring usability and quality of life updates to the experience of auditing and investigating the contents of GenAI traces, from enhanced span content rendering using markdown to a standardized span component structure. (#13685, #13357, #13242, @daniellok-db)
-
🚄 New Tracing Integrations - MLflow Tracing now supports DSPy, LiteLLM, and Google Gemini, enabling a one-line, fully automated tracing experience. These integrations unlock enhanced observability across a broader range of industry tools. Stay tuned for upcoming integrations and updates! (#13801, @TomeHirata, #13585, @B-Step62)
-
📊 Expanded LLM-as-a-Judge Support - MLflow now enhances its evaluation capabilities with support for additional providers, including
Anthropic
,Bedrock
,Mistral
, andTogetherAI
, alongside existing providers likeOpenAI
. Users can now also configure proxy endpoints or self-hosted LLMs that follow the provider API specs by using the newproxy_url
andextra_headers
options. Visit the LLM-as-a-Judge documentation for more details! (#13715, #13717, @B-Step62) -
⏰ Environment Variable Detection - As a helpful reminder for when you are deploying models, MLflow now detects and reminds users of environment variables set during model logging, ensuring they are configured for deployment. In addition to this, the
mlflow.models.predict
utility has also been updated to include these variables in serving simulations, improving pre-deployment validation. (#13584, @serena-ruan)
Breaking Changes to ChatModel Interface
-
ChatModel Interface Updates - As part of a broader unification effort within MLflow and services that rely on or deeply integrate with MLflow's GenAI features, we are working on a phased approach to making a consistent and standard interface for custom GenAI application development and usage. In the first phase (planned for release in the next few releases of MLflow), we are marking several interfaces as deprecated, as they will be changing. These changes will be:
- Renaming of Interfaces:
ChatRequest
→ChatCompletionRequest
to provide disambiguation for future planned request interfaces.ChatResponse
→ChatCompletionResponse
for the same reason as the input interface.metadata
fields withinChatRequest
andChatResponse
→custom_inputs
andcustom_outputs
, respectively.
- Streaming Updates:
predict_stream
will be updated to enable true streaming for custom GenAI applications. Currently, it returns a generator with synchronous outputs from predict. In a future release, it will return a generator ofChatCompletionChunks
, enabling asynchronous streaming. While the API call structure will remain the same, the returned data payload will change significantly, aligning with LangChain’s implementation.
- Legacy Dataclass Deprecation:
- Dataclasses in
mlflow.models.rag_signatures
will be deprecated, merging into unifiedChatCompletionRequest
,ChatCompletionResponse
, andChatCompletionChunks
.
- Dataclasses in
- Renaming of Interfaces:
Other Features:
Here is the updated section with links to each PR ID and author:
markdown Copy code Other Features:
- [Evaluate] Add Huggingface BLEU metrics to MLflow Evaluate (#12799, @nebrass)
- [Models / Databricks] Add support for
spark_udf
when running on Databricks Serverless runtime, Databricks Connect, and prebuilt Python environments (#13276, #13496, @WeichenXu123) - [Scoring] Add a
model_config
parameter forpyfunc.spark_udf
for customization of batch inference payload submission (#13517, @WeichenXu123) - [Tracing] Standardize retriever span outputs to a list of MLflow
Document
s (#13242, @daniellok-db) - [UI] Add support for visualizing and comparing nested parameters within the MLflow UI (#13012, @jescalada)
- [UI] Add support for comparing logged artifacts within the Compare Run page in the MLflow UI (#13145, @jescalada)
- [Databricks] Add support for
resources
definitions forLangChain
model logging (#13315, @sunishsheth2009) - [Databricks] Add support for defining multiple retrievers within
dependencies
for Agent definitions (#13246, @sunishsheth2009)
Bug fixes:
- [Database] Cascade deletes to datasets when deleting experiments to fix a bug in MLflow's
gc
command when deleting experiments with logged datasets (#13741, @daniellok-db) - [Models] Fix a bug with
LangChain
'spyfunc
predict input conversion (#13652, @serena-ruan) - [Models] Fix signature inference for subclasses and
Optional
dataclasses that define a model's signature (#13440, @bbqiu) - [Tracking] Fix an issue with async logging batch splitting validation rules (#13722, @WeichenXu123)
- [Tracking] Fix an issue with
LangChain
's autologging thread-safety behavior (#13672, @B-Step62) - [Tracking] Disable support for running Spark autologging in a threadpool due to limitations in Spark (#13599, @WeichenXu123)
- [Tracking] Mark
role
andindex
as required for chat schema (#13279, @chenmoneygithub) - [Tracing] Handle raw response in OpenAI autolog (#13802, @harupy)
- [Tracing] Fix a bug with tracing source run behavior when running inference with multithreading on
LangChain
models (#13610, @WeichenXu123)
Documentation updates:
- [Docs] Add docstring warnings for upcoming changes to ChatModel (#13730, @stevenchen-db)
- [Docs] Add a contributor's guide for implementing tracing integrations (#13333, @B-Step62)
- [Docs] Add guidance in the use of
model_config
when logging models as code (#13631, @sunishsheth2009) - [Docs] Add documentation for the use of custom library artifacts with the
code_paths
model logging feature (#13702, @TomeHirata) - [Docs] Improve
SparkML
log_model
documentation with guidance on how to return probabilities from classification models (#13684, @WeichenXu123)
For a comprehensive list of changes, see the release change log, and check out the latest documentation on mlflow.org.