Rapids manager
RapidsManager #
Can be used to build different types of rapids. That can then be added to Validation sets
Source code in src/rapidata/rapidata_client/validation/rapids/rapids_manager.py
classification_rapid #
classification_rapid(
instruction: str,
answer_options: list[str],
datapoint: str,
truths: list[str],
data_type: str = MEDIA,
metadata: Sequence[Metadata] = [],
) -> ClassificationRapid
Build a classification rapid
Parameters:
Name | Type | Description | Default |
---|---|---|---|
instruction
|
str
|
The instruction/question to be shown to the labeler. |
required |
answer_options
|
list[str]
|
The options that the labeler can choose from to answer the question. |
required |
datapoint
|
str
|
The datapoint that the labeler will be labeling. |
required |
truths
|
list[str]
|
The correct answers to the question. |
required |
data_type
|
str
|
The type of the datapoint. Defaults to RapidataDataTypes.MEDIA. |
MEDIA
|
metadata
|
Sequence[Metadata]
|
The metadata that is attached to the rapid. Defaults to []. |
[]
|
Source code in src/rapidata/rapidata_client/validation/rapids/rapids_manager.py
compare_rapid #
compare_rapid(
instruction: str,
truth: str,
datapoint: list[str],
data_type: str = MEDIA,
metadata: Sequence[Metadata] = [],
) -> CompareRapid
Build a compare rapid
Parameters:
Name | Type | Description | Default |
---|---|---|---|
instruction
|
str
|
The instruction that the labeler will be comparing the assets on. |
required |
truth
|
str
|
The correct answer to the comparison. (has to be one of the assets) |
required |
datapoint
|
list[str]
|
The two assets that the labeler will be comparing. |
required |
data_type
|
str
|
The type of the datapoint. Defaults to RapidataDataTypes.MEDIA. |
MEDIA
|
metadata
|
Sequence[Metadata]
|
The metadata that is attached to the rapid. Defaults to []. |
[]
|
Source code in src/rapidata/rapidata_client/validation/rapids/rapids_manager.py
select_words_rapid #
select_words_rapid(
instruction: str,
truths: list[int],
datapoint: str,
sentence: str,
strict_grading: bool = True,
) -> SelectWordsRapid
Build a select words rapid
Parameters:
Name | Type | Description | Default |
---|---|---|---|
instruction
|
str
|
The instruction for the labeler. |
required |
truths
|
list[int]
|
The indices of the words that are the correct answers. |
required |
datapoint
|
str
|
The asset that the labeler will be selecting words from. |
required |
sentence
|
str
|
The sentence that the labeler will be selecting words from. (split up by spaces) |
required |
strict_grading
|
bool
|
Whether the grading should be strict or not. True means that all correct words and no wrong words have to be selected for the rapid to be marked as correct. False means that at least one correct word and no wrong words have to be selected for the rapid to be marked as correct. Defaults to True. |
True
|
Source code in src/rapidata/rapidata_client/validation/rapids/rapids_manager.py
locate_rapid #
locate_rapid(
instruction: str,
truths: list[Box],
datapoint: str,
metadata: Sequence[Metadata] = [],
) -> LocateRapid
Build a locate rapid
Parameters:
Name | Type | Description | Default |
---|---|---|---|
instruction
|
str
|
The instruction on what the labeler should do. |
required |
truths
|
list[Box]
|
The bounding boxes of the object that the labeler ought to be locating. |
required |
datapoint
|
str
|
The asset that the labeler will be locating the object in. |
required |
metadata
|
Sequence[Metadata]
|
The metadata that is attached to the rapid. Defaults to []. |
[]
|
Source code in src/rapidata/rapidata_client/validation/rapids/rapids_manager.py
draw_rapid #
draw_rapid(
instruction: str,
truths: list[Box],
datapoint: str,
metadata: Sequence[Metadata] = [],
) -> DrawRapid
Build a draw rapid
Parameters:
Name | Type | Description | Default |
---|---|---|---|
instruction
|
str
|
The instructions on what the labeler |
required |
truths
|
list[Box]
|
The bounding boxes of the object that the labeler ought to be drawing. |
required |
datapoint
|
str
|
The asset that the labeler will be drawing the object in. |
required |
metadata
|
Sequence[Metadata]
|
The metadata that is attached to the rapid. Defaults to []. |
[]
|