contents‍
In Evidently v0.1.59, we moved the existing dashboard functionality to the new API.   Â
Here is a quick guide on migrating from the old to the new API. In short, it is very, very easy.
Previously, we had two different objects in Evidently.Â
One is a Dashboard: a pre-built report that computes different metrics and rich interactive visualizations. There are several Tabs for different types of dashboards to choose from, like a RegressionPerformanceTab, or DataDriftTab.
Another is a JSON profile: a JSON “version” of the Dashboard that only contains raw metrics and simple plot data that you can log and use elsewhere. There are several ProfileSections, like RegressionPerformanceProfileSection, or DataDriftProfileSection.Â
We simplified things now.
Now, there is a single Report object that has Presets, like DataDriftPreset or RegressionPreset. You can generate the Report object and choose to render it in the notebook, save it as HTML, generate (or save) a JSON, or get it as a Python dictionary.Â
That’s it!Â
The rest works just the same: you need to feed two datasets in the Evidently as a reference and current datasets, you can use column mapping, and choose between pre-built reports that combine different metrics together.Â
Here is how it works now.
After installing Evidently and preparing the data, you can create a Report object and list the presets to include.Â
Here is how you create a Data Drift report and show it in the notebook.
Here is an example notebook to replay with all available presets. You can also save the report as an HTML file.
You must repeat the same steps to create and run the Report object.
To get the output as a JSON instead of a visual report, simply write:
You can also get the output as a Python dictionary.
You can see how it works in the same example notebook.
Don’t worry, the old Dashboards API will remain in the library for a while to ensure there are no breaking changes. Your old code still works.
However, we will eventually remove it. We suggest you move to the new API soon by updating existing pipelines or notebooks that use Evidently.
If something does not work as expected during your migration, please ask in GitHub issues or our Discord. All the new cool features will be added to the new Reports only!
You can also fix the version of Evidently in your code if you want to keep using the older version.
Things are now more elegant and consistent, but this is not the only reason.Â
This refactoring allowed us to make sure that we can continue scaling Evidently with ease.Â
Unified metrics. We also created a new underlying Metrics component that is reused across Evidently Reports and Tests. This way, if you calculate a certain metric or run a test, it is always calculated in the same way, across all the reports, without code duplication.Â
Ease of customization. Since the beginning, users have asked for small and big tweaks to the Evidently dashboards. We get it! We implemented a few options, but they remained a bit clunky. Now, it has become super easy to build your own Report. Instead of “editing” the existing Dashboards, you can just list the Metrics to include and build exactly the Report you want.Â
Here is how you can do it now:
You can check this example notebook to see all the metrics and how to customize them.
Enabling future development. Now that we have this new backend in place, it will make it much easier to add new types of Reports, add options, and build new functionality. Yahoo!Â
Tackling big data is the next big thing we are investigating. If you want to use Evidently on Spark, come chat with us on Discord!
We hope you have already had the chance to work with Test Suites. This is an alternative interface that you can use to evaluate your models and data.
We treat Reports and Tests Suites as complementary as they fit different workflows.Â
When it’s best to use Reports:
When it’s best to use Test Suites:
Tests are made to integrate with tools like Airflow and get into your production pipelines. For example, you can run them whenever you receive a new batch of data, new labels, or generate predictions. And if tests fail, you can always get the Report to debug!
We hope you liked this update!
We are always happy to learn about how you use Evidently, and what else is missing. Please share your feedback in GitHub, on Discord, or simply drop us an email.
Sign up to the User newsletter to get updates on new features, integrations and code tutorials. No spam, just good old release notes.
Subscribe ⟶