kumoai.trainer.TrainingJobResult#
- class kumoai.trainer.TrainingJobResult[source]#
Bases:
objectRepresents a completed training job.
A
TrainingJobResultobject can either be obtained by creating aTrainingJobobject 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: TrainingTableJob | TrainingTable#
Returns the training table associated with this training job, either as a
TrainingTableor aTrainingTableJobdepending on the status of the training table generation job.
- property predictive_query: PredictiveQuery#
Returns the
PredictiveQueryobject 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: