kumoai.trainer.TrainingJobResult#
- class kumoai.trainer.TrainingJobResult[source]#
Bases:
object
Represents a completed training job.
A
TrainingJobResult
object can either be obtained by creating aTrainingJob
object and calling theresult()
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()
- property training_table: Union[TrainingTableJob, TrainingTable]#
Returns the training table associated with this training job, either as a
TrainingTable
or aTrainingTableJob
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.
- 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: