Rapidata order manager
RapidataOrderManager #
Handels everything regarding the orders from creation to retrieval.
Attributes:
Name | Type | Description |
---|---|---|
filters |
RapidataFilters
|
The RapidataFilters instance. |
settings |
RapidataSettings
|
The RapidataSettings instance. |
selections |
RapidataSelections
|
The RapidataSelections instance. |
Source code in src/rapidata/rapidata_client/order/rapidata_order_manager.py
create_classification_order #
create_classification_order(
name: str,
instruction: str,
answer_options: list[str],
datapoints: list[str],
data_type: str = MEDIA,
responses_per_datapoint: int = 10,
contexts: list[str] | None = None,
validation_set_id: str | None = None,
confidence_threshold: float | None = None,
filters: Sequence[RapidataFilter] = [],
settings: Sequence[RapidataSetting] = [],
selections: Sequence[RapidataSelection] | None = None,
) -> RapidataOrder
Create a classification order.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the order. (Will not be shown to the labeler) |
required |
instruction
|
str
|
The instruction for how the data should be classified. |
required |
answer_options
|
list[str]
|
The list of options for the classification. |
required |
datapoints
|
list[str]
|
The list of datapoints for the classification - each datapoint will be labeled. |
required |
data_type
|
str
|
The data type of the datapoints. Defaults to RapidataDataTypes.MEDIA. Other option: RapidataDataTypes.TEXT ("text"). |
MEDIA
|
responses_per_datapoint
|
int
|
The number of responses that will be collected per datapoint. Defaults to 10. |
10
|
contexts
|
list[str]
|
The list of contexts for the classification. Defaults to None. If provided has to be the same length as datapoints and will be shown in addition to the instruction and options. (Therefore will be different for each datapoint) Will be match up with the datapoints using the list index. |
None
|
validation_set_id
|
str
|
The ID of the validation set. Defaults to None. If provided, one validation task will be shown infront of the datapoints that will be labeled. |
None
|
confidence_threshold
|
float
|
The probability threshold for the classification. Defaults to None. If provided, the classification datapoint will stop after the threshold is reached or at the number of responses, whatever happens first. |
None
|
filters
|
Sequence[RapidataFilter]
|
The list of filters for the classification. Defaults to []. Decides who the tasks should be shown to. |
[]
|
settings
|
Sequence[RapidataSetting]
|
The list of settings for the classification. Defaults to []. Decides how the tasks should be shown. |
[]
|
selections
|
Sequence[RapidataSelection]
|
The list of selections for the classification. Defaults to None. Decides in what order the tasks should be shown. |
None
|
Source code in src/rapidata/rapidata_client/order/rapidata_order_manager.py
create_compare_order #
create_compare_order(
name: str,
instruction: str,
datapoints: list[list[str]],
data_type: str = MEDIA,
responses_per_datapoint: int = 10,
contexts: list[str] | None = None,
validation_set_id: str | None = None,
confidence_threshold: float | None = None,
filters: Sequence[RapidataFilter] = [],
settings: Sequence[RapidataSetting] = [],
selections: Sequence[RapidataSelection] | None = None,
) -> RapidataOrder
Create a compare order.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the order. (Will not be shown to the labeler) |
required |
instruction
|
str
|
The instruction for the comparison. Will be shown along side each datapoint. |
required |
datapoints
|
list[list[str]]
|
Outher list is the datapoints, inner list is the options for the comparison - each datapoint will be labeled. |
required |
data_type
|
str
|
The data type of the datapoints. Defaults to RapidataDataTypes.MEDIA. Other option: RapidataDataTypes.TEXT ("text"). |
MEDIA
|
responses_per_datapoint
|
int
|
The number of responses that will be collected per datapoint. Defaults to 10. |
10
|
contexts
|
list[str]
|
The list of contexts for the comparison. Defaults to None. If provided has to be the same length as datapoints and will be shown in addition to the instruction. (Therefore will be different for each datapoint) Will be match up with the datapoints using the list index. |
None
|
validation_set_id
|
str
|
The ID of the validation set. Defaults to None. If provided, one validation task will be shown infront of the datapoints that will be labeled. |
None
|
confidence_threshold
|
float
|
The probability threshold for the comparison. Defaults to None. If provided, the comparison datapoint will stop after the threshold is reached or at the number of responses, whatever happens first. |
None
|
filters
|
Sequence[RapidataFilter]
|
The list of filters for the comparison. Defaults to []. Decides who the tasks should be shown to. |
[]
|
settings
|
Sequence[RapidataSetting]
|
The list of settings for the comparison. Defaults to []. Decides how the tasks should be shown. |
[]
|
selections
|
Sequence[RapidataSelection]
|
The list of selections for the comparison. Defaults to None. Decides in what order the tasks should be shown. |
None
|
Source code in src/rapidata/rapidata_client/order/rapidata_order_manager.py
create_free_text_order #
create_free_text_order(
name: str,
instruction: str,
datapoints: list[str],
data_type: str = MEDIA,
responses_per_datapoint: int = 10,
filters: Sequence[RapidataFilter] = [],
settings: Sequence[RapidataSetting] = [],
selections: Sequence[RapidataSelection] | None = None,
) -> RapidataOrder
Create a free text order.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the order. |
required |
instruction
|
str
|
The instruction to answer with free text. Will be shown along side each datapoint. |
required |
datapoints
|
list[str]
|
The list of datapoints for the free text - each datapoint will be labeled. |
required |
data_type
|
str
|
The data type of the datapoints. Defaults to RapidataDataTypes.MEDIA. Other option: RapidataDataTypes.TEXT ("text"). |
MEDIA
|
responses_per_datapoint
|
int
|
The number of responses that will be collected per datapoint. Defaults to 10. |
10
|
filters
|
Sequence[RapidataFilter]
|
The list of filters for the free text. Defaults to []. Decides who the tasks should be shown to. |
[]
|
settings
|
Sequence[RapidataSetting]
|
The list of settings for the free text. Defaults to []. Decides how the tasks should be shown. |
[]
|
selections
|
Sequence[RapidataSelection]
|
The list of selections for the free text. Defaults to None. Decides in what order the tasks should be shown. |
None
|
Source code in src/rapidata/rapidata_client/order/rapidata_order_manager.py
create_select_words_order #
create_select_words_order(
name: str,
instruction: str,
datapoints: list[str],
sentences: list[str],
responses_per_datapoint: int = 10,
validation_set_id: str | None = None,
filters: Sequence[RapidataFilter] = [],
settings: Sequence[RapidataSetting] = [],
selections: Sequence[RapidataSelection] | None = None,
) -> RapidataOrder
Create a select words order.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the order. |
required |
instruction
|
str
|
The instruction for how the words should be selected. Will be shown along side each datapoint. |
required |
datapoints
|
list[str]
|
The list of datapoints for the select words - each datapoint will be labeled. |
required |
sentences
|
list[str]
|
The list of sentences for the select words - Will be split up by spaces and shown along side each datapoint. Must be the same length as datapoints. |
required |
responses_per_datapoint
|
int
|
The number of responses that will be collected per datapoint. Defaults to 10. |
10
|
validation_set_id
|
str
|
The ID of the validation set. Defaults to None. If provided, one validation task will be shown infront of the datapoints that will be labeled. |
None
|
filters
|
Sequence[RapidataFilter]
|
The list of filters for the select words. Defaults to []. Decides who the tasks should be shown to. |
[]
|
settings
|
Sequence[RapidataSetting]
|
The list of settings for the select words. Defaults to []. Decides how the tasks should be shown. |
[]
|
selections
|
Sequence[RapidataSelection]
|
The list of selections for the select words. Defaults to None. Decides in what order the tasks should be shown. |
None
|
Source code in src/rapidata/rapidata_client/order/rapidata_order_manager.py
create_locate_order #
create_locate_order(
name: str,
target: str,
datapoints: list[str],
responses_per_datapoint: int = 10,
contexts: list[str] | None = None,
validation_set_id: str | None = None,
filters: Sequence[RapidataFilter] = [],
settings: Sequence[RapidataSetting] = [],
selections: Sequence[RapidataSelection] | None = None,
) -> RapidataOrder
Create a locate order.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the order. |
required |
target
|
str
|
The target what should be located. Will be shown along side each datapoint. |
required |
datapoints
|
list[str]
|
The list of datapoints for the locate - each datapoint will be labeled. |
required |
responses_per_datapoint
|
int
|
The number of responses that will be collected per datapoint. Defaults to 10. |
10
|
contexts
|
list[str]
|
The list of contexts for the comparison. Defaults to None. If provided has to be the same length as datapoints and will be shown in addition to the instruction. (Therefore will be different for each datapoint) Will be match up with the datapoints using the list index. |
None
|
validation_set_id
|
str
|
The ID of the validation set. Defaults to None. If provided, one validation task will be shown infront of the datapoints that will be labeled. |
None
|
filters
|
Sequence[RapidataFilter]
|
The list of filters for the locate. Defaults to []. Decides who the tasks should be shown to. |
[]
|
settings
|
Sequence[RapidataSetting]
|
The list of settings for the locate. Defaults to []. Decides how the tasks should be shown. |
[]
|
selections
|
Sequence[RapidataSelection]
|
The list of selections for the locate. Defaults to None. Decides in what order the tasks should be shown. |
None
|
Source code in src/rapidata/rapidata_client/order/rapidata_order_manager.py
create_draw_order #
create_draw_order(
name: str,
target: str,
datapoints: list[str],
responses_per_datapoint: int = 10,
contexts: list[str] | None = None,
validation_set_id: str | None = None,
filters: Sequence[RapidataFilter] = [],
settings: Sequence[RapidataSetting] = [],
selections: Sequence[RapidataSelection] | None = None,
) -> RapidataOrder
Create a draw order.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the order. |
required |
target
|
str
|
The target for how the lines should be drawn. Will be shown along side each datapoint. |
required |
datapoints
|
list[str]
|
The list of datapoints for the draw lines - each datapoint will be labeled. |
required |
responses_per_datapoint
|
int
|
The number of responses that will be collected per datapoint. Defaults to 10. |
10
|
contexts
|
list[str]
|
The list of contexts for the comparison. Defaults to None. If provided has to be the same length as datapoints and will be shown in addition to the instruction. (Therefore will be different for each datapoint) Will be match up with the datapoints using the list index. |
None
|
validation_set_id
|
str
|
The ID of the validation set. Defaults to None. If provided, one validation task will be shown infront of the datapoints that will be labeled. |
None
|
filters
|
Sequence[RapidataFilter]
|
The list of filters for the draw lines. Defaults to []. Decides who the tasks should be shown to. |
[]
|
settings
|
Sequence[RapidataSetting]
|
The list of settings for the draw lines. Defaults to []. Decides how the tasks should be shown. |
[]
|
selections
|
Sequence[RapidataSelection]
|
The list of selections for the draw lines. Defaults to None. Decides in what order the tasks should be shown. |
None
|
Source code in src/rapidata/rapidata_client/order/rapidata_order_manager.py
get_order_by_id #
get_order_by_id(order_id: str) -> RapidataOrder
Get an order by ID.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
order_id
|
str
|
The ID of the order. |
required |
Returns:
Name | Type | Description |
---|---|---|
RapidataOrder |
RapidataOrder
|
The Order instance. |
Source code in src/rapidata/rapidata_client/order/rapidata_order_manager.py
find_orders #
find_orders(
name: str = "", amount: int = 1
) -> list[RapidataOrder]
Find your recent orders given criteria. If nothing is provided, it will return the most recent order.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the order - matching order will contain the name. Defaults to "" for any order. |
''
|
amount
|
int
|
The amount of orders to return. Defaults to 1. |
1
|
Returns:
Type | Description |
---|---|
list[RapidataOrder]
|
list[RapidataOrder]: A list of RapidataOrder instances. |