Customize JSON output
How to modify what is included in the Evidently JSON or Python dictionary output.
Last updated
How to modify what is included in the Evidently JSON or Python dictionary output.
Last updated
Pre-requisites:
You know how to generate Evidently Reports and Test Suites and get the output as JSON or Python dictionary
Notebook example on JSON / Python dictionary customization:
Note: to export the Evidently Metric output in the tabular format, you can use the as_dataframe()
option instead of JSON or Python dictionary export.
Default JSON and Python dictionary output includes the values of Metrics and Test results but does not include visualizations.
Using the following options, you can customize the JSON/Python dictionary output for Reports and Test Suites.
If you want to include some of the information about the visualizations computed by Evidently (for example, distribution bins), you can specify it:
This way, you will receive a verbose output with additional info on visualizations.
This is convenient if you want to integrate Evidently output with other visualization tools.
You can also flexibly define which specific output to include in JSON or Python dictionary.
To specify which metrics, tests, or components to include, use include
:
This is convenient if you want to get a minimalistic output that is easy to parse.
To understand which components exist, generate the complete example output, and look at the keys.
Use exclude
to specify which metrics, tests, or components to omit. You can combine using include and exclude, for example:
If you want to include all fields for a dictionary, use True
.
To apply filters to column-based results, use AllDict
.
This way, you can flexibly define the exact output format. Sometimes using exclude/include together might be more convenient than simply listing the components.