mlflow.gemini
The mlflow.gemini module provides an API for tracing the interaction with Gemini models.
- mlflow.gemini.autolog(log_traces: bool = True, disable: bool = False, silent: bool = False)[source]
- Note - Autologging is known to be compatible with the following package versions: - 1.0.0<=- google-genai<=- 1.41.0. Autologging may not succeed when used with package versions outside of this range.- Enables (or disables) and configures autologging from Gemini to MLflow. Currently, both legacy SDK google-generativeai and new SDK google-genai are supported. Both synchronous and asynchronous calls are supported for the new SDK. - Parameters
- log_traces – If - True, traces are logged for Gemini models. If- False, no traces are collected during inference. Default to- True.
- disable – If - True, disables the Gemini autologging. Default to- False.
- silent – If - True, suppress all event logs and warnings from MLflow during Gemini autologging. If- False, show all events and warnings.