Bootstrap MLflow integration on first access. Checks the config, imports the module, and creates the integration client. Returns the client or ``None`` if MLflow is disabled or unavailable.
(self)
| 217 | self._mlflow_client: Any = _UNSET |
| 218 | |
| 219 | def _init_mlflow(self) -> Optional[Any]: |
| 220 | """Bootstrap MLflow integration on first access. |
| 221 | |
| 222 | Checks the config, imports the module, and creates the integration |
| 223 | client. Returns the client or ``None`` if MLflow is disabled or |
| 224 | unavailable. |
| 225 | """ |
| 226 | try: |
| 227 | mlflow_cfg = getattr(self.config, "mlflow", None) |
| 228 | if mlflow_cfg is None or not mlflow_cfg.enabled: |
| 229 | return None |
| 230 | from feast.mlflow import _register_store |
| 231 | |
| 232 | _register_store(self) |
| 233 | |
| 234 | from feast.mlflow_integration.client import FeastMlflowClient |
| 235 | |
| 236 | return FeastMlflowClient(self) |
| 237 | except ImportError: |
| 238 | return None |
| 239 | except Exception as e: |
| 240 | warnings.warn(f"Failed to configure MLflow tracking: {e}") |
| 241 | return None |
| 242 | |
| 243 | @property |
| 244 | def mlflow(self) -> Any: |
no test coverage detected