# Jobs

> Jobs - Tracks asynchronous work being done within a project

This Markdown file sits beside the HTML page at the same path (with a `.md` suffix). It summarizes the topic and lists links for tools and LLM context.

Companion generated at `2026-05-06T18:17:09.838128+00:00` (UTC).

## Primary page

- [Jobs](https://docs.datarobot.com/en/docs/api/reference/sdk/jobs.html): Full documentation for this topic (HTML).

## Sections on this page

- [classdatarobot.models.Job](https://docs.datarobot.com/en/docs/api/reference/sdk/jobs.html#datarobot.models.Job): In-page section heading.
- [classmethodget(project_id, job_id)](https://docs.datarobot.com/en/docs/api/reference/sdk/jobs.html#datarobot.models.Job.get): In-page section heading.
- [cancel()](https://docs.datarobot.com/en/docs/api/reference/sdk/jobs.html#datarobot.models.Job.cancel): In-page section heading.
- [get_result(params=None)](https://docs.datarobot.com/en/docs/api/reference/sdk/jobs.html#datarobot.models.Job.get_result): In-page section heading.
- [get_result_when_complete(max_wait=600, params=None)](https://docs.datarobot.com/en/docs/api/reference/sdk/jobs.html#datarobot.models.Job.get_result_when_complete): In-page section heading.
- [refresh()](https://docs.datarobot.com/en/docs/api/reference/sdk/jobs.html#datarobot.models.Job.refresh): In-page section heading.
- [wait_for_completion(max_wait=600)](https://docs.datarobot.com/en/docs/api/reference/sdk/jobs.html#datarobot.models.Job.wait_for_completion): In-page section heading.
- [classdatarobot.models.TrainingPredictionsJob](https://docs.datarobot.com/en/docs/api/reference/sdk/jobs.html#datarobot.models.TrainingPredictionsJob): In-page section heading.
- [classmethodget(project_id, job_id, model_id=None, data_subset=None)](https://docs.datarobot.com/en/docs/api/reference/sdk/jobs.html#datarobot.models.TrainingPredictionsJob.get): In-page section heading.
- [refresh()](https://docs.datarobot.com/en/docs/api/reference/sdk/jobs.html#datarobot.models.TrainingPredictionsJob.refresh): In-page section heading.
- [cancel()](https://docs.datarobot.com/en/docs/api/reference/sdk/jobs.html#datarobot.models.TrainingPredictionsJob.cancel): In-page section heading.
- [get_result(params=None)](https://docs.datarobot.com/en/docs/api/reference/sdk/jobs.html#datarobot.models.TrainingPredictionsJob.get_result): In-page section heading.
- [get_result_when_complete(max_wait=600, params=None)](https://docs.datarobot.com/en/docs/api/reference/sdk/jobs.html#datarobot.models.TrainingPredictionsJob.get_result_when_complete): In-page section heading.
- [wait_for_completion(max_wait=600)](https://docs.datarobot.com/en/docs/api/reference/sdk/jobs.html#datarobot.models.TrainingPredictionsJob.wait_for_completion): In-page section heading.
- [classdatarobot.models.ShapMatrixJob](https://docs.datarobot.com/en/docs/api/reference/sdk/jobs.html#datarobot.models.ShapMatrixJob): In-page section heading.
- [classmethodget(project_id, job_id, model_id=None, dataset_id=None)](https://docs.datarobot.com/en/docs/api/reference/sdk/jobs.html#datarobot.models.ShapMatrixJob.get): In-page section heading.
- [refresh()](https://docs.datarobot.com/en/docs/api/reference/sdk/jobs.html#datarobot.models.ShapMatrixJob.refresh): In-page section heading.
- [cancel()](https://docs.datarobot.com/en/docs/api/reference/sdk/jobs.html#datarobot.models.ShapMatrixJob.cancel): In-page section heading.
- [get_result(params=None)](https://docs.datarobot.com/en/docs/api/reference/sdk/jobs.html#datarobot.models.ShapMatrixJob.get_result): In-page section heading.
- [get_result_when_complete(max_wait=600, params=None)](https://docs.datarobot.com/en/docs/api/reference/sdk/jobs.html#datarobot.models.ShapMatrixJob.get_result_when_complete): In-page section heading.
- [wait_for_completion(max_wait=600)](https://docs.datarobot.com/en/docs/api/reference/sdk/jobs.html#datarobot.models.ShapMatrixJob.wait_for_completion): In-page section heading.
- [classdatarobot.models.FeatureImpactJob](https://docs.datarobot.com/en/docs/api/reference/sdk/jobs.html#datarobot.models.FeatureImpactJob): In-page section heading.
- [classmethodget(project_id, job_id, with_metadata=False)](https://docs.datarobot.com/en/docs/api/reference/sdk/jobs.html#datarobot.models.FeatureImpactJob.get): In-page section heading.
- [cancel()](https://docs.datarobot.com/en/docs/api/reference/sdk/jobs.html#datarobot.models.FeatureImpactJob.cancel): In-page section heading.
- [get_result(params=None)](https://docs.datarobot.com/en/docs/api/reference/sdk/jobs.html#datarobot.models.FeatureImpactJob.get_result): In-page section heading.
- [get_result_when_complete(max_wait=600, params=None)](https://docs.datarobot.com/en/docs/api/reference/sdk/jobs.html#datarobot.models.FeatureImpactJob.get_result_when_complete): In-page section heading.
- [refresh()](https://docs.datarobot.com/en/docs/api/reference/sdk/jobs.html#datarobot.models.FeatureImpactJob.refresh): In-page section heading.
- [wait_for_completion(max_wait=600)](https://docs.datarobot.com/en/docs/api/reference/sdk/jobs.html#datarobot.models.FeatureImpactJob.wait_for_completion): In-page section heading.

## Related documentation

- [Developer documentation](https://docs.datarobot.com/en/docs/api/index.html): Linked from this page.
- [API reference](https://docs.datarobot.com/en/docs/api/reference/index.html): Linked from this page.
- [Python API client](https://docs.datarobot.com/en/docs/api/reference/sdk/index.html): Linked from this page.
- [Administration](https://docs.datarobot.com/en/docs/api/reference/sdk/tag-admin.html): Linked from this page.
- [AsyncFailureError](https://docs.datarobot.com/en/docs/api/reference/sdk/errors.html#datarobot.errors.AsyncFailureError): Linked from this page.
- [TrainingPredictions](https://docs.datarobot.com/en/docs/api/reference/sdk/training_predictions.html#datarobot.models.training_predictions.TrainingPredictions): Linked from this page.

## Documentation content

### class datarobot.models.Job

Tracks asynchronous work being done within a project

- Variables:

#### classmethod get(project_id, job_id)

Fetches one job.

- Parameters:
- Returns: job – The job
- Return type: Job
- Raises: AsyncFailureError – Querying this resource gave a status code other than 200 or 303

#### cancel()

Cancel this job. If this job has not finished running, it will be
removed and canceled.

#### get_result(params=None)

- Parameters: params ( dict or None ) – Query parameters to be added to request to get results.

> [!NOTE] Notes
> For featureEffects, source param is required to define source,
> otherwise the default is training.

- Returns:result– Return type depends on the job type
: - for model jobs, a Model is returned
  - for predict jobs, a pandas.DataFrame (with predictions) is returned
  - for featureImpact jobs, a list of dicts by default (seewith_metadataparameter of theFeatureImpactJobclass and itsget()method).
  - for primeRulesets jobs, a list of Rulesets
  - for primeModel jobs, a PrimeModel
  - for primeDownloadValidation jobs, a PrimeFile
  - for predictionExplanationInitialization jobs, a PredictionExplanationsInitialization
  - for predictionExplanations jobs, a PredictionExplanations
  - for featureEffects, a FeatureEffects.
*Return type:object*Raises:*JobNotFinished– If the job is not finished, the result is not available.
*AsyncProcessUnsuccessfulError– If the job errored or was aborted

#### get_result_when_complete(max_wait=600, params=None)

- Parameters:
- Returns: result – Return type is the same as would be returned by Job.get_result.
- Return type: object
- Raises:

#### refresh()

Update this object with the latest job data from the server.

#### wait_for_completion(max_wait=600)

Waits for job to complete.

- Parameters: max_wait ( Optional[int] ) – How long to wait for the job to finish.
- Return type: None

### class datarobot.models.TrainingPredictionsJob

#### classmethod get(project_id, job_id, model_id=None, data_subset=None)

Fetches one training predictions job.

The resulting [TrainingPredictions](https://docs.datarobot.com/en/docs/api/reference/sdk/training_predictions.html#datarobot.models.training_predictions.TrainingPredictions) object will be annotated with model_id and data_subset.

- Parameters:
- Returns: job – The job
- Return type: TrainingPredictionsJob

#### refresh()

Update this object with the latest job data from the server.

#### cancel()

Cancel this job. If this job has not finished running, it will be
removed and canceled.

#### get_result(params=None)

- Parameters: params ( dict or None ) – Query parameters to be added to request to get results.

> [!NOTE] Notes
> For featureEffects, source param is required to define source,
> otherwise the default is training.

- Returns:result– Return type depends on the job type
: - for model jobs, a Model is returned
  - for predict jobs, a pandas.DataFrame (with predictions) is returned
  - for featureImpact jobs, a list of dicts by default (seewith_metadataparameter of theFeatureImpactJobclass and itsget()method).
  - for primeRulesets jobs, a list of Rulesets
  - for primeModel jobs, a PrimeModel
  - for primeDownloadValidation jobs, a PrimeFile
  - for predictionExplanationInitialization jobs, a PredictionExplanationsInitialization
  - for predictionExplanations jobs, a PredictionExplanations
  - for featureEffects, a FeatureEffects.
*Return type:object*Raises:*JobNotFinished– If the job is not finished, the result is not available.
*AsyncProcessUnsuccessfulError– If the job errored or was aborted

#### get_result_when_complete(max_wait=600, params=None)

- Parameters:
- Returns: result – Return type is the same as would be returned by Job.get_result.
- Return type: object
- Raises:

#### wait_for_completion(max_wait=600)

Waits for job to complete.

- Parameters: max_wait ( Optional[int] ) – How long to wait for the job to finish.
- Return type: None

### class datarobot.models.ShapMatrixJob

#### classmethod get(project_id, job_id, model_id=None, dataset_id=None)

Fetches one SHAP matrix job.

- Parameters:
- Returns: job – The job
- Return type: ShapMatrixJob
- Raises: AsyncFailureError – Querying this resource gave a status code other than 200 or 303

#### refresh()

Update this object with the latest job data from the server.

- Return type: None

#### cancel()

Cancel this job. If this job has not finished running, it will be
removed and canceled.

#### get_result(params=None)

- Parameters: params ( dict or None ) – Query parameters to be added to request to get results.

> [!NOTE] Notes
> For featureEffects, source param is required to define source,
> otherwise the default is training.

- Returns:result– Return type depends on the job type
: - for model jobs, a Model is returned
  - for predict jobs, a pandas.DataFrame (with predictions) is returned
  - for featureImpact jobs, a list of dicts by default (seewith_metadataparameter of theFeatureImpactJobclass and itsget()method).
  - for primeRulesets jobs, a list of Rulesets
  - for primeModel jobs, a PrimeModel
  - for primeDownloadValidation jobs, a PrimeFile
  - for predictionExplanationInitialization jobs, a PredictionExplanationsInitialization
  - for predictionExplanations jobs, a PredictionExplanations
  - for featureEffects, a FeatureEffects.
*Return type:object*Raises:*JobNotFinished– If the job is not finished, the result is not available.
*AsyncProcessUnsuccessfulError– If the job errored or was aborted

#### get_result_when_complete(max_wait=600, params=None)

- Parameters:
- Returns: result – Return type is the same as would be returned by Job.get_result.
- Return type: object
- Raises:

#### wait_for_completion(max_wait=600)

Waits for job to complete.

- Parameters: max_wait ( Optional[int] ) – How long to wait for the job to finish.
- Return type: None

### class datarobot.models.FeatureImpactJob

Custom Feature Impact job to handle different return value structures.

The original implementation had just the the data and the new one also includes some metadata.

In general, we aim to keep the number of Job classes low by just utilizing the job_type
attribute to control any specific formatting; however in this case when we needed to support
a new representation with the _same_ job_type, customizing the behavior of
_make_result_from_location allowed us to achieve our ends without complicating the
_make_result_from_json method.

#### classmethod get(project_id, job_id, with_metadata=False)

Fetches one job.

- Parameters:
- Returns: job – The job
- Return type: Job
- Raises: AsyncFailureError – Querying this resource gave a status code other than 200 or 303

#### cancel()

Cancel this job. If this job has not finished running, it will be
removed and canceled.

#### get_result(params=None)

- Parameters: params ( dict or None ) – Query parameters to be added to request to get results.

> [!NOTE] Notes
> For featureEffects, source param is required to define source,
> otherwise the default is training.

- Returns:result– Return type depends on the job type
: - for model jobs, a Model is returned
  - for predict jobs, a pandas.DataFrame (with predictions) is returned
  - for featureImpact jobs, a list of dicts by default (seewith_metadataparameter of theFeatureImpactJobclass and itsget()method).
  - for primeRulesets jobs, a list of Rulesets
  - for primeModel jobs, a PrimeModel
  - for primeDownloadValidation jobs, a PrimeFile
  - for predictionExplanationInitialization jobs, a PredictionExplanationsInitialization
  - for predictionExplanations jobs, a PredictionExplanations
  - for featureEffects, a FeatureEffects.
*Return type:object*Raises:*JobNotFinished– If the job is not finished, the result is not available.
*AsyncProcessUnsuccessfulError– If the job errored or was aborted

#### get_result_when_complete(max_wait=600, params=None)

- Parameters:
- Returns: result – Return type is the same as would be returned by Job.get_result.
- Return type: object
- Raises:

#### refresh()

Update this object with the latest job data from the server.

#### wait_for_completion(max_wait=600)

Waits for job to complete.

- Parameters: max_wait ( Optional[int] ) – How long to wait for the job to finish.
- Return type: None
