{"id":21501,"library":"kedro-mlflow","title":"Kedro-MLflow","description":"A Kedro plugin that integrates MLflow for experiment tracking, model registry, and pipeline logging. Version 2.0.2 supports Kedro >=1.0.0 and MLflow >=3.0.0 (dropped support for MLflow 2.x). Released roughly every few months.","status":"active","version":"2.0.2","language":"python","source_language":"en","source_url":"https://github.com/Galileo-Galilei/kedro-mlflow","tags":["kedro","mlflow","mlops","tracking","experiment-tracking","pipeline"],"install":[{"cmd":"pip install kedro-mlflow","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core framework dependency; requires >=1.0.0","package":"kedro","optional":false},{"reason":"ML tracking and model registry; requires >=3.0.0","package":"mlflow","optional":false}],"imports":[{"note":"Configuration is done via CLI command, not direct import.","wrong":"","symbol":"mlflow.yml config","correct":"kedro mlflow init"},{"note":"Common mistake: using wrong subpackage path.","wrong":"from kedro_mlflow.io import MlflowModelTrackingDataset","symbol":"MlflowModelTrackingDataset","correct":"from kedro_mlflow.io.models import MlflowModelTrackingDataset"}],"quickstart":{"code":"from pathlib import Path\nfrom kedro.framework.project import configure_project\nconfigure_project(Path.cwd().name)\nfrom kedro.framework.session import KedroSession\nfrom kedro_mlflow.io.models import MlflowModelTrackingDataset\nimport mlflow\n\nwith KedroSession.create() as session:\n    context = session.load_context()\n    # Example: log a model with MlflowModelTrackingDataset\n    data_set = MlflowModelTrackingDataset(\n        filepath=\"model.pkl\",\n        flavor=\"mlflow.sklearn\",\n        model_name=\"test_model\",\n        save_args={\"registered_model_name\": \"test_model\"}\n    )\n    # simulate using the dataset\n    import pandas as pd\n    data = pd.DataFrame({\"a\": [1, 2], \"b\": [3, 4]})\n    data_set.save(data)\n    print(\"Model saved to MLflow.\")","lang":"python","description":"Basic usage: configure Kedro project, create a Kedro session, and save a model using MlflowModelTrackingDataset."},"warnings":[{"fix":"Update Kedro to >=1.0.0 and MLflow to >=3.0.0. See migration guide.","message":"v2.0.0 dropped support for MLflow <3.0.0 and Kedro <1.0.0. If upgrading from v1.x, you must upgrade both Kedro and MLflow.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Replace `run_id` in dataset instantiation with `load_args` containing `model_uri`.","message":"v2.0.0 removed the `run_id` argument from `MlflowModelTrackingDataset`. Use `load_args={\"model_uri\": \"models:/<model_name>/<version>\"}` instead.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Set `tracking.disable_tracking.disable_autologging: true` in mlflow.yml.","message":"On Databricks, autologging is enabled by default and conflicts with kedro-mlflow. You must disable autologging in mlflow.yml.","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure all MLflow logging happens inside Kedro node functions or callbacks that the plugin manages.","message":"MLflow thread-safety can cause tracking to be lost if nodes run in parallel. The plugin reopens the run before each node, but custom logging outside nodes may be lost.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"pip install kedro-mlflow","cause":"kedro-mlflow not installed in the current environment.","error":"ModuleNotFoundError: No module named 'kedro_mlflow'"},{"fix":"Use `from kedro_mlflow.io.models import MlflowModelTrackingDataset`","cause":"The correct import path is from kedro_mlflow.io.models.","error":"ImportError: cannot import name 'MlflowModelTrackingDataset' from 'kedro_mlflow.io'"},{"fix":"Use `load_args={\"model_uri\": \"models:/<model_name>/<version>\"}` instead of `run_id`.","cause":"Using an incorrect model URI format in load_args in MLflow 3.x.","error":"mlflow.exceptions.MlflowException: Unsupported model URI scheme"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}