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.
estimated_cost
property
#
estimated_cost: CostEstimate
An approximate estimate of what this job will cost to run to completion.
This is an estimate, not the final bill - see :class:CostEstimate. The
estimate is priced shortly after the job is created; this call waits for
it to become available.
Raises:
| Type | Description |
|---|---|
TimeoutError
|
If the estimate is still not available after a few minutes. |
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_progress #
get_progress() -> JobProgress
Gets a snapshot of how far along the job is.
Unlike meth:
get_status, which only reports the coarse job state, this
returns the labeling completion percentage and — for custom audiences — the
recruiting funnel of the annotator pool behind the job, so you can tell normal
labeling from a job that is waiting on recruiting or has stalled.
This does not block: it reports the current progress and returns immediately.
Returns:
| Name | Type | Description |
|---|---|---|
JobProgress |
JobProgress
|
The current progress of the job. |
Source code in src/rapidata/rapidata_client/job/rapidata_job.py
get_results #
get_results() -> RapidataResults
Gets the results of the job.
If the job is still processing, this method will block until the job is completed and then return the results. If the job's results have gone stale, regeneration is triggered automatically and this method blocks until the fresh results are ready.
Returns:
| Name | Type | Description |
|---|---|---|
RapidataResults |
RapidataResults
|
The results of the job. |
Raises:
| Type | Description |
|---|---|
Exception
|
If failed to get job results, or if the job cannot complete
without intervention — it is in manual review ( |
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. |
Exception
|
If the job has failed, or can't progress on its own — it is
in |
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.