Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/rapidata/rapidata_client/flow/rapidata_flow_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ def create_ranking_flow(
self,
name: str,
instruction: str,
responses_per_flow_batch: int = 100,
max_response_threshold: int = 100,
min_response_threshold: int = 1,
validation_set_id: str | None = None,
settings: Sequence[RapidataSetting] | None = None,
) -> RapidataFlow:
Expand All @@ -33,7 +34,8 @@ def create_ranking_flow(
Args:
name: The name of the flow.
instruction: The instruction for the ranking comparisons. Will be shown with each matchup.
responses_per_flow_batch: The number of responses required per flow batch.
max_response_threshold: The maximum number of responses that will be collected per flow item.
min_response_threshold: The minimum number of responses required for the flow to be considered complete in case of a timeout.
validation_set_id: Optional validation set ID.
settings: Optional settings for the flow.

Expand All @@ -53,7 +55,8 @@ def create_ranking_flow(
name=name,
criteria=instruction,
validationSetId=validation_set_id,
responsesRequired=responses_per_flow_batch,
minResponses=min_response_threshold,
maxResponses=max_response_threshold,
featureFlags=(
[setting._to_feature_flag() for setting in settings]
if settings
Expand Down