Skip to content

Shuffling selection

ShufflingSelection #

ShufflingSelection(selections: Sequence[RapidataSelection])

Bases: RapidataSelection

ShufflingSelection Class

Shuffles the selections provided in the list.

Parameters:

Name Type Description Default
selections Sequence[RapidataSelection]

List of selections to shuffle.

required
Example

selection = ShufflingSelection(
            [ValidSelections("validation_id", 1), LabelingSelection(2)])
This means that the users will get 1 validation task and 2 labeling tasks in a shuffled order.

Source code in src/rapidata/rapidata_client/selection/shuffling_selection.py
def __init__(self, selections: Sequence[RapidataSelection]):
    self.selections = selections