Rapidata job definition
RapidataJobDefinition #
Source code in src/rapidata/rapidata_client/job/rapidata_job_definition.py
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 definition 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. |
preview #
preview() -> RapidataJobDefinition
Will open the browser where you can preview the job definition before giving it to an audience.
Source code in src/rapidata/rapidata_client/job/rapidata_job_definition.py
delete #
Deletes the job definition and all its revisions.
Source code in src/rapidata/rapidata_client/job/rapidata_job_definition.py
update_dataset #
update_dataset(
datapoints: list[str] | list[list[str]],
data_type: Literal["text", "media"] = "media",
contexts: list[str] | None = None,
media_contexts: list[list[str]] | None = None,
sentences: list[str] | None = None,
private_metadata: list[dict[str, str]] | None = None,
) -> RapidataJobDefinition
Update the dataset of the job definition.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
datapoints
|
list[str] | list[list[str]]
|
paths to the datapoints or strings for text datapoints. |
required |
data_type
|
Literal['text', 'media']
|
The type of the datapoints. |
'media'
|
contexts
|
list[str]
|
One text context per datapoint. Defaults to None. |
None
|
media_contexts
|
list[list[str]]
|
Image URLs / paths shown alongside each datapoint, one inner list per datapoint. Use a single-element inner list for one image per datapoint, or multiple entries to display several images. Defaults to None. |
None
|
sentences
|
list[str]
|
The sentences associated with each datapoint (used by select-words workflows). Defaults to None. |
None
|
private_metadata
|
list[dict[str, str]]
|
Key-value pairs attached to each datapoint that will not be shown to labelers. Defaults to None. |
None
|