fix: MLflow 3.7+ compatibility - graceful handling of removed agent tracer#472
Open
vivekvar-dl wants to merge 1 commit intoSylphAI-Inc:mainfrom
Open
fix: MLflow 3.7+ compatibility - graceful handling of removed agent tracer#472vivekvar-dl wants to merge 1 commit intoSylphAI-Inc:mainfrom
vivekvar-dl wants to merge 1 commit intoSylphAI-Inc:mainfrom
Conversation
…racer Fixes SylphAI-Inc#459 The mlflow.openai._agent_tracer module was removed or relocated in MLflow 3.7.0, causing import failures when users try to run the quickstart example. Changes: - Added graceful fallback when MlflowOpenAgentTracingProcessor is unavailable - Added MLFLOW_AGENT_TRACER_AVAILABLE flag to check tracer availability - Added clear error messages directing users to downgrade MLflow if needed - Changed hard import failure to a soft warning with None fallback This ensures the library loads successfully even with newer MLflow versions, while providing actionable error messages when tracing features are used.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #459
Problem
The
mlflow.openai._agent_tracermodule was removed or relocated in MLflow 3.7.0, causing import failures when users try to run the quickstart example from the documentation.Solution
This PR adds graceful handling for the missing module:
MLFLOW_AGENT_TRACER_AVAILABLEflag to check tracer availability separately from MLflow itselfNonefallbackenable_mlflow_local()andenable_mlflow_local_with_server()directing users to either:Changes
adalflow/tracing/mlflow_integration.pyto handle the missing import gracefullyMlflowOpenAgentTracingProcessorTesting
The library now loads successfully with MLflow 3.7+, and provides actionable error messages when tracing features are attempted.
Related
This ensures the AdalFlow library can coexist with newer MLflow versions without breaking imports, while maintaining backwards compatibility for users with older MLflow installations.