Definition

Great expectations (GX) is an open-source Python library that allows you to define expectations about your data. GX is integrated into Openlayer, allowing you to use any GX expectations as Openlayer tests. To check all the expectations supported, check out the GX expectations gallery.

Taxonomy

  • Category: Integrity.
  • Task types: LLM, tabular classification, tabular regression, text classification.
  • Availability: and .

Why it matters

  • Data is the substrate on top of which models are built. Validating that the data conforms to expectations is a key step in the model development and monitoring processes.
  • GX is a powerful tool that allows you to easily set up a myriad of expectations on your data.

Guide

To create a GX test, click on “Create test” for the “Great expectations” test.

Then, once the modal is open, select the expectation you are interested in from the dropdown menu next to “Parameters.” For example, let’s select the expect_column_mean_to_be_between.

Once you have selected the expectation, you need to provide the arguments needed to run it. You can click the link next to “Parameters” to see the documentation for the expectation you selected. In this case, the expectation requires a column, with the name of the column, a min_value, and a max_value. You can provide these arguments by clicking on “Add kwarg”.

The “Threshold” should be kept as “Success is True,” as the expectation will return True if the expectation is met (in this case, the column mean is between the min_value and the max_value).

Once you have added all the arguments, you can click on “Create test” to create the test.

Test configuration examples

If you are writing a tests.json, here are a few valid configurations for the character length test: