Artifact Fetching

class gretel_client.gretel.artifact_fetching.GretelReport(as_dict: dict, as_html: str)

Dataclass for a Gretel synthetic data quality report.

display_in_browser()

Display the HTML report in a browser.

display_in_notebook()

Display the HTML report in a notebook.

save_html(save_path: str | Path)

Save the HTML report to a file at the given path.

class gretel_client.gretel.artifact_fetching.ReportType(value)

The kind of report to fetch.

gretel_client.gretel.artifact_fetching.fetch_final_model_config(model: Model) dict

Fetch the final model configuration from a model training job.

Parameters:

model – The Gretel model object.

Returns:

The final training configuration as a dict.

gretel_client.gretel.artifact_fetching.fetch_model_logs(model: Model) List[dict]

Fetch the logs from training a Gretel model.

Parameters:

model – The Gretel model object.

Returns:

A list of log messages.

gretel_client.gretel.artifact_fetching.fetch_model_report(model: Model, report_type: ReportType = ReportType.SQS) GretelReport

Fetch the quality report from a model training job.

Parameters:
  • model – The Gretel model object.

  • report_type – The type of report to fetch. One of “sqs” or “text”.

Returns:

The Gretel report object.

gretel_client.gretel.artifact_fetching.fetch_synthetic_data(record_handler: RecordHandler) _DataFrameT

Fetch synthetic data from a model generate job.

This function requires the pandas package to be installed.

Parameters:

record_handler – A RecordHandler object from the model.

Raises:

ImportError – If the pandas package is not installed.

Returns:

A pandas DataFrame containing the synthetic data.