Gretel Reports

Quickly assess the quality of your synthetic data

from gretel_client import Gretel

gretel = Gretel(project_name="sdk-docs", api_key="prompt")

trained = gretel.submit_train("tabular-actgan", data_source="data.csv")

When you train a model, Gretel automatically creates a Synthetic Data Quality Report to help you assess how well the synthetic data captures the statistical properties of the training data.

The report is stored as an attribute of the returned job-results object:

# view report quality scores
print(trained.report)

The report attribute is itself an object with useful methods and attributes:

# extract SQS from quality_scoures dictionary
sqs = trained.report.quality_scores["synthetic_data_quality_score"]

# display report in browser if running locally
trained.report.display_in_browser()

# display report in notebook if running remotely (including colab)
trained.report.display_in_notebook()

You can download the synthetic data used in the report as follows:

df_report_synth = trained.fetch_report_synthetic_data()
print(df_report_synth.head())

Last updated