kumoai.pquery.TrainingTableJob#
- class kumoai.pquery.TrainingTableJob[source]#
Bases:
KumoFuture
[TrainingTable
]A representation of an ongoing training table generation job in the Kumo platform.
import kumoai # See `PredictiveQuery` documentation: pquery = kumoai.PredictiveQuery(...) # If a training table is generated in nonblocking mode, the response # will be of type `TrainingTableJob`: training_table_job = pquery.generate_training_table(non_blocking=True) # You can also construct a `TrainingTableJob` from a job ID, e.g. # one that is present in the Kumo Jobs page: training_table_job = kumoai.TrainingTableJob("trainingjob-...") # Get the status of the job: print(training_table_job.status()) # Attach to the job, and poll progress updates: training_table_job.attach() # Cancel the job: training_table_job.cancel() # Wait for the job to complete, and return a `TrainingTable`: training_table_job.result()
- Parameters:
job_id (
str
) – ID of the training table generation job.
- result()[source]#
Returns the resolved state of the future.
- Raises:
Exception – If the future is complete but in a failed state due to an exception being raised, this method will raise the same exception.
- Return type:
- future()[source]#
Returns the
concurrent.futures.Future
object wrapped by this future. It is not recommended to access this object directly.
- status()[source]#
Returns the status of a running training table generation job.
- Return type:
JobStatusReport
- attach()[source]#
Allows a user to observe the status of the future while it is not complete.
- Return type:
- cancel()[source]#
Cancels a running training table generation job, and raises an error if cancellation failed.
- Return type:
- static __new__(cls, *args, **kwds)#
- done()#
Returns
True
if this future has been resolved withresult()
, orFalse
if this future is still in-progress. Note that this method will returnTrue
if the future is complete, but in a failed state, and that this method will returnFalse
if the job is complete, but the future has not been awaited.- Return type: