Rapidata job
RapidataJob #
RapidataJob(
job_id: str,
name: str,
audience_id: str,
created_at: datetime,
definition_id: str,
openapi_service: OpenAPIService,
pipeline_id: str | None = None,
)
An instance of a Rapidata job.
Used to interact with a specific job in the Rapidata system, such as getting status and retrieving results.
A job is created from a job definition and an audience, and represents a specific run of that definition.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
job_id
|
str
|
The ID of the job. |
required |
name
|
str
|
The name of the job. |
required |
openapi_service
|
OpenAPIService
|
The OpenAPIService instance for API interaction. |
required |
Source code in src/rapidata/rapidata_client/job/rapidata_job.py
completed_at
property
#
Returns the completion date of the job, or None if not completed.
get_status #
Gets the status of the job.
Returns:
| Type | Description |
|---|---|
str
|
The current status of the job as a string. |
Source code in src/rapidata/rapidata_client/job/rapidata_job.py
get_results #
get_results() -> RapidataResults
Gets the results of the job.
If wait_for_completion is True and the job is still processing, this method will block until the job is completed and then return the results.
Returns:
| Name | Type | Description |
|---|---|---|
RapidataResults |
RapidataResults
|
The results of the job. |
Raises:
| Type | Description |
|---|---|
Exception
|
If failed to get job results. |
Source code in src/rapidata/rapidata_client/job/rapidata_job.py
display_progress_bar #
Displays a progress bar for the job processing using tqdm.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
refresh_rate
|
int
|
How often to refresh the progress bar, in seconds. |
5
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If refresh_rate is less than 1. |
Source code in src/rapidata/rapidata_client/job/rapidata_job.py
delete #
Deletes the job.
Source code in src/rapidata/rapidata_client/job/rapidata_job.py
view #
Opens the job details page in the browser.