kumoai.pquery.PredictionTableJob#
- class kumoai.pquery.PredictionTableJob[source]#
Bases:
KumoFuture
[PredictionTable
]A representation of an ongoing prediction table generation job in the Kumo platform.
import kumoai # See `PredictiveQuery` documentation: pquery = kumoai.PredictiveQuery(...) # If a prediction table is generated in nonblocking mode, the response # will be of type `PredictionTableJob`: prediction_table_job = pquery.generate_prediction_table(non_blocking=True) # You can also construct a `PredictionTableJob` from a job ID, e.g. # one that is present in the Kumo Jobs page: prediction_table_job = kumoai.PredictionTableJob("gen-predtable-job-...") # Get the status of the job: print(prediction_table_job.status()) # Cancel the job: prediction_table_job.cancel() # Wait for the job to complete, and return a `PredictionTable`: prediction_table_job.result()
- Parameters:
job_id (
str
) – ID of the prediction 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 prediction table generation job.
- Return type:
JobStatusReport
- cancel()[source]#
Cancels a running prediction 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: