connection
mlflow_assistant.core.connection
¶
MLflow connection module for handling connections to MLflow Tracking Server.
This module provides functionality to connect to both local and remote MLflow Tracking Servers using environment variables or direct configuration.
MLflowConnection(tracking_uri=None, client_factory=None)
¶
MLflow connection class to handle connections to MLflow Tracking Server.
This class provides functionality to connect to both local and remote MLflow Tracking Servers.
Initialize MLflow connection.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
tracking_uri
|
str | None
|
URI of the MLflow Tracking Server. If None, will try to get from environment. |
None
|
client_factory
|
Any
|
A callable to create the MlflowClient instance. Defaults to MlflowClient. |
None
|
Source code in src/mlflow_assistant/core/connection.py
connect()
¶
Connect to MLflow Tracking Server.
Returns¶
Tuple[bool, str]: (success, message)
Source code in src/mlflow_assistant/core/connection.py
get_client()
¶
Get MLflow client instance.
Returns¶
MlflowClient: MLflow client instance.
Raises¶
MLflowConnectionError: If not connected to MLflow Tracking Server.
Source code in src/mlflow_assistant/core/connection.py
get_connection_info()
¶
Get connection information.
Returns¶
Dict[str, Any]: Connection information.