{"id":3994,"library":"evidently","title":"Evidently AI","description":"Evidently is an open-source Python library (currently v0.7.21) for evaluating, testing, and monitoring machine learning and LLM systems in production. It offers 100+ built-in metrics to detect data drift, model performance issues, data quality problems, and LLM-specific evaluations. The library is actively developed with frequent releases, providing both an open-source framework for offline evaluations and a UI for continuous monitoring, with additional features available through Evidently Cloud.","status":"active","version":"0.7.21","language":"en","source_language":"en","source_url":"https://github.com/evidentlyai/evidently","tags":["machine learning","mlops","monitoring","data drift","model drift","llm","observability","data quality","python"],"install":[{"cmd":"pip install evidently","lang":"bash","label":"Install stable version"}],"dependencies":[{"reason":"Core data structure for input datasets.","package":"pandas","optional":false},{"reason":"Often used for datasets in examples and ML metrics calculation.","package":"scikit-learn","optional":true}],"imports":[{"note":"As of v0.7, the new API is the default. 'evidently.future' imports were for a transition period (v0.6-0.6.7) and are now considered legacy for newer versions.","wrong":"from evidently.future import Report","symbol":"Report","correct":"from evidently.report import Report"},{"note":"Metric presets are now located under `evidently.metric_preset` for clarity.","wrong":"from evidently.preset import DataDriftPreset","symbol":"DataDriftPreset","correct":"from evidently.metric_preset import DataDriftPreset"},{"note":"Starting with v0.7, explicit `Dataset` objects are required when defining data, along with `DataDefinition`.","wrong":"from evidently import Dataset","symbol":"Dataset","correct":"from evidently.core.datasets import Dataset"},{"note":"Starting with v0.7, explicit `DataDefinition` objects are required to map input columns by type and role, replacing `column_mapping`.","wrong":"from evidently import DataDefinition","symbol":"DataDefinition","correct":"from evidently.core.data_definition import DataDefinition"}],"quickstart":{"code":"import pandas as pd\nfrom sklearn import datasets\n\nfrom evidently.report import Report\nfrom evidently.metric_preset import DataDriftPreset\nfrom evidently.options import DataDriftOptions # To demonstrate custom options\nfrom evidently.core.datasets import Dataset\nfrom evidently.core.data_definition import DataDefinition\n\n# Prepare a toy dataset (Adult dataset from OpenML)\nreference_data_frame = datasets.fetch_openml(name=\"adult\", version=2, as_frame=\"auto\").frame\ncurrent_data_frame = reference_data_frame.sample(n=5000, random_state=0)\n\n# Define data schema using DataDefinition (required from v0.7)\ndata_definition = DataDefinition(\n    prediction_features=[\"income\"],\n    target_names=\"income\",\n    categorical_features=[\n        'workclass', 'education', 'marital-status', 'occupation',\n        'relationship', 'race', 'sex', 'native-country'\n    ]\n)\n\n# Create Evidently Dataset objects\nreference_dataset = Dataset(reference_data_frame, data_definition)\ncurrent_dataset = Dataset(current_data_frame, data_definition)\n\n# Create and run a Data Drift Report\ndata_drift_report = Report(metrics=[\n    DataDriftPreset(\n        # Example of custom options, e.g., for statistical tests\n        # data_drift_options=DataDriftOptions(threshold=0.1)\n    )\n])\ndata_drift_report.run(reference_data=reference_dataset, current_data=current_dataset)\n\n# To display in a Jupyter notebook or save to HTML\n# data_drift_report.show()\n# data_drift_report.save_html(\"data_drift_report.html\")\n\nprint(\"Data drift report generated successfully!\")","lang":"python","description":"This quickstart demonstrates how to generate a Data Drift Report using Evidently. It fetches a sample dataset, creates Evidently `Dataset` and `DataDefinition` objects (essential since v0.7), and then runs a `DataDriftPreset` report. The report can be displayed interactively in a notebook or saved as an HTML file."},"warnings":[{"fix":"Refer to the official 'Migration Guide' in the Evidently documentation. Update import statements, and explicitly define `Dataset` and `DataDefinition` for your data inputs.","message":"Evidently v0.7 introduced a major API overhaul, making the new API the default. This includes changes to how Reports are imported (`from evidently.report import Report`) and the introduction of explicit `Dataset` and `DataDefinition` objects which replace the older `column_mapping` approach. Code written for versions prior to 0.7 (especially 0.6.7 and older) will likely break.","severity":"breaking","affected_versions":">=0.7.0"},{"fix":"Upgrade your Python environment to 3.10 or newer (Evidently requires `>=3.10`).","message":"Support for Python 3.9 was dropped in Evidently v0.7.21. Users on Python 3.9 will encounter errors or compatibility issues.","severity":"breaking","affected_versions":">=0.7.21"},{"fix":"When installing with DVC, ensure `pathspec<1` is enforced, e.g., `pip install evidently 'dvc-data<3' 'pathspec<1'` or check for DVC's recommended `pathspec` version at the time.","message":"When using Evidently alongside DVC (Data Version Control), there can be a dependency conflict with `pathspec`. Evidently v0.7.20 explicitly locked `pathspec` to `<1` for DVC compatibility. Ensure your `pathspec` version respects this constraint if you encounter issues with DVC.","severity":"gotcha","affected_versions":">=0.7.20"},{"fix":"Always check the `evidently` and `pandas` compatibility matrix in the official documentation. For optimal compatibility, upgrade to the latest `evidently` version and a compatible `pandas` version (e.g., Pandas 3.x with Evidently >=0.7.21).","message":"Evidently v0.7.21 added explicit support for Pandas 3. While this is an improvement, users of older Evidently versions might experience compatibility issues or unexpected behavior when using Pandas 3. Conversely, newer Evidently features might rely on specific Pandas 3 functionalities.","severity":"gotcha","affected_versions":"<0.7.21 with Pandas 3, or older Evidently versions with Pandas 3"},{"fix":"Upgrade your Evidently Python library to `0.7.0` or higher and migrate your Evidently Cloud projects to v2.","message":"Evidently Cloud v1 entered read-only mode after May 31, 2025, for free users. Users of Evidently Cloud must migrate to Cloud v2 and use Evidently library version `0.7.0` or newer to continue sending data and accessing features.","severity":"deprecated","affected_versions":"<0.7.0 (when using Evidently Cloud)"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}