kumoai.trainer.TrainingJobResult#

class kumoai.trainer.TrainingJobResult[source]#

Bases: object

Represents a completed training job.

A TrainingJobResult object can either be obtained by creating a TrainingJob 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

training_job = kumoai.TrainingJob("trainingjob-...")

# Wait for a training job's completion, and get its result:
training_job_result = training_job.result()

# Alternatively, create the result directly, but be sure that the job
# is completed:
training_job_result = kumoai.TrainingJobResult("trainingjob-...")

# Get associated objects:
pquery = training_job_result.predictive_query
training_table = training_job_result.training_table

# Get holdout data:
holdout_df = training_job_result.holdout_df()

Example

>>> import kumoai  
>>> job_future = kumoai.TrainingJob(id=...)  
>>> job = job_future.result()  
__init__(job_id)[source]#
property id: str#

The unique ID of this training job.

property model_plan: ModelPlan#

Returns the model plan associated with this training job.

property training_table: Union[TrainingTableJob, TrainingTable]#

Returns the training table associated with this training job, either as a TrainingTable or a TrainingTableJob depending on the status of the training table generation job.

property predictive_query: PredictiveQuery#

Returns the PredictiveQuery object that defined the training table for this training job.

property tracking_url: str#

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

metrics()[source]#

Returns the metrics associated with this completed training job, or raises an exception if metrics cannot be obtained.

Return type:

ModelEvaluationMetrics

holdout_url()[source]#

Returns a URL for downloading or reading the holdout dataset.

If Kumo is deployed as a SaaS application, the returned URL will be a presigned AWS S3 URL with a TTL of 1 hour. If Kumo is deployed as a Snowpark Container Services application, the returned URL will be a Snowflake stage path that can be directly accessed within a Snowflake worksheet.

Return type:

str

holdout_df()[source]#

Reads the holdout dataset (parquet file) as pandas DataFrame. :rtype: DataFrame

Note

Please note that this function may be memory-intensive, depending on the size of your holdout dataframe. Please exercise caution.