kumoai.trainer.BatchPredictionJobResult#

class kumoai.trainer.BatchPredictionJobResult[source]#

Bases: object

Represents a completed batch prediction job.

A BatchPredictionJobResult object can either be obtained by creating a BatchPredictionJob object and calling the result() method to await the job’s completion, or by directly creating the object. The former approach is recommended, as it includes verification that the job finished succesfully.

import kumoai

prediction_job = kumoai.BatchPredictionJob("bp-job-...")

# Wait for a batch prediction job's completion, and get its result:
prediction_job_result = prediction_job.result()

# Alternatively, create the result directly, but be sure that the job
# is completed:
prediction_job_result = kumoai.BatchPredictionJobResult("bp-job-...")

# Get associated objects:
prediction_table = prediction_job_result.prediction_table

# Get prediction data (in-memory):
predictions_df = training_job.predictions_df()

# Export prediction data to any output connector:
prediction_job_result.export(
    output_type = ...,
    output_connector = ...,
    output_table_name = ...,
)
__init__(job_id)[source]#
property id: str#

The unique ID of this batch prediction job.

property tracking_url: str#

Returns a tracking URL pointing to the UI display of this batch prediction job.

summary()[source]#

Returns summary statistics associated with the batch prediction job’s output, or raises an exception if summary statistics cannot be obtained.

Return type:

BatchPredictionJobSummary

property prediction_table: Union[PredictionTableJob, PredictionTable]#

Returns the prediction table associated with this prediction job, either as a PredictionTable or a PredictionTableJob depending on the status of the prediction table generation job.

export(output_config, non_blocking=True)[source]#

Export the prediction output or the embedding output to the specific output location.

Parameters:
  • output_config (OutputConfig) – The output configuration to be used.

  • non_blocking (bool) – If True, the method will return a future object ArtifactExportJob representing the export job. If False, the method will block until the export job is complete and return ArtifactExportResult.

Return type:

Union[ArtifactExportJob, ArtifactExportResult]

predictions_urls()[source]#

Returns a list of URLs for downloading or reading the predictions.

If Kumo is deployed as a SaaS application, the returned URLs will be presigned AWS S3 URLs. If Kumo is deployed as a Snowpark Container Services application, the returned URLs will be Snowflake stage paths that can be directly accessed within a Snowflake worksheet. If Kumo is deployed as a Databricks application, Databricks UC volume paths.

Return type:

List[str]

predictions_df()[source]#

Returns a DataFrame object representing the generated predictions. :rtype: DataFrame

Warning

This method will load the full prediction output into memory as a DataFrame object. If you are working on a machine with limited resources, please use predictions_urls() instead to download the data and perform analysis per-partition.

embeddings_urls()[source]#

Returns a list of URLs for downloading or reading the embeddings.

If Kumo is deployed as a SaaS application, the returned URLs will be presigned AWS S3 URLs. If Kumo is deployed as a Snowpark Container Services application, the returned URLs will be Snowflake stage paths that can be directly accessed within a Snowflake worksheet. If Kumo is deployed as a Databricks application, Databricks UC volume paths.

Return type:

List[str]

embeddings_df()[source]#

Returns a DataFrame object representing the generated embeddings. :rtype: DataFrame

Warning

This method will load the full prediction output into memory as a DataFrame object. If you are working on a machine with limited resources, please use embeddings_urls() instead to download the data and perform analysis per-partition.