Documentation Index
Fetch the complete documentation index at: https://docs.labelbox.com/llms.txt
Use this file to discover all available pages before exploring further.
Client
Fundamentals
Workflows are connected to theProject class and are generated automatically during project creation. Workflows help organize and control the flow of labeling tasks through different stages.
Key concepts:
- Workflows are composed of nodes and edges.
- Each node can have only one input connection, except when both
Initial labeling taskandRework (All Rejected)nodes serve as inputs to a single downstream node. - No changes are pushed to the platform until you call
update_config(). - All nodes must be connected for the workflow to be valid.
Access a workflow
Clone a workflow from a different project
Reset a workflow
Usereset_to_initial_nodes() to only have the InitialLabeling and InitialRework nodes and start from scratch. The method will return an object InitialNodes with two attributes labeling and rework. You can also pass parameters to configure the initial nodes.
Commit changes
To push changes made to a workflow, you must useupdate_config(). In case of validation issue, it will throw a ValueError exception.
Nodes
Add a node
Types of nodes are listed in the enumNodeType:
Initial nodes:
NodeType.InitialLabeling- Entry point for new labeling tasksNodeType.InitialRework- Entry point for tasks that need to be reworked
NodeType.Review- Review completed labelsNodeType.Logic- Apply filters to route tasks conditionallyNodeType.CustomRework- Custom rework step with configurable settings
NodeType.Done- Marks tasks as completedNodeType.Rework- Sends tasks back to the rework queueNodeType.CustomReworkcan be used as a terminal node or be connected to another node.
NodeType.CustomRework can be used as a terminal node or be connected to another node.
Delete a node
This automatically removes connected edges. Initial nodes can’t be deleted.Edges
Add an edge
Edges connect the output of a source node to the input of a target node. All nodes must be connected in the workflow. Types of outputs are listed in the enumNodeOutput:
NodeOutput.If(default value, can be omitted)NodeOutput.ElseNodeOutput.ApprovedNodeOutput.Rejected
Outputs per node
| Node | Available outputs |
|---|---|
InitialLabeling | NodeOutput.If |
InitialRework | NodeOutput.If |
Review | NodeOutput.Approved, NodeOutput.Rejected |
Logic | NodeOutput.If, NodeOutput.Else |
CustomRework | Optional NodeOutput.If |
Done | |
Rework |
Node attributes
The following attributes can be configured for each node type:| Node | Configuratble attributes |
|---|---|
InitialLabeling | instructions, max_contributions_per_user |
InitialRework | instructions, individual_assignment, max_contributions_per_user |
Review | instructions, group_assignment, max_contributions_per_user |
Logic | name, match_filters, filters |
CustomRework | name, instructions, group_assignment, individual_assignment, max_contributions_per_user |
Done | name |
Rework | name |
max_contributions_per_user: Positive integer representing the maximum number of labels per task queue (empty for no limit)instructions: Custom instructions for labelers working on this nodegroup_assignment: List of user group IDs assigned to this nodeindividual_assignment: Individual assignment strategy (you can use theIndividualAssignmentenum)
Filters
Logic node
The Logic node contains filters that determine how tasks flow through the workflow. Thematch_filters attribute controls how multiple filters are evaluated:
MatchFilters.Any: Match any of the filters (OR logic)MatchFilters.All: Match all of the filters (AND logic)
Add and remove filters
Manage filters on Logic nodes
Available filters
Each filter type can be used at most once per Logic node. The enumFilterField provides available filters for search or deletion:
FilterField.AnnotationFilterField.BatchFilterField.ConsensusAverageFilterField.DatasetFilterField.FeatureConsensusAverageFilterField.IssueCategoryFilterField.LabelingTimeFilterField.LabeledAtFilterField.LabeledByFilterField.MetadataFilterField.ModelPredictionFilterField.NlSearchFilterField.ReviewTimeFilterField.Sample
annotation
Filter by the presence of specific annotations.schema_node_ids is a list of schema node IDs that correspond to tools or classifications defined in the project’s ontology schema.
Operators: None (direct list filter)
batch
Filter by batch membership. **Operators: **is_one_ofis_not_one_of
consensus_average
Filter by overall consensus score. Operators: None (range filter with min/max)dataset
Filter by dataset membership. Operators: None (direct list filter)feature_consensus_average
Filter by consensus score for specific features.annotations is a list of schema node IDs that correspond to tools or classifications defined in the project’s ontology schema.
Operators: None (range filter with min/max and annotation list)
issue_category
Filter by issue categories flagged during review. Operators:is_one_of
labeling_time
Filter by how long it took to create the label. The value represents a number of seconds. Operators:greater_thanless_thangreater_than_or_equalless_than_or_equalbetween
labeled_at
Filter by when the label was created. Operators:between
labeled_by
Filter by the user who created the label. Operators:is_one_of
metadata
Filter by data row metadata values. Each conditionm_condition) takes a metadata schema ID key) and list of strings as parameters value).
Operators:
containsstarts_withends_withdoes_not_containis_anyis_not_any
model_prediction
Filter by model predictions. Model predictions use a list of conditions namedmp_condition.
Each condition takes a list of model IDs, followed by an integer for the minimum score min_score) and an integer for the optional maxim score max_score).
is_none takes precedence over other operators.
Operators:
is_one_ofis_not_one_ofis_none
natural_language
Filter using semantic search. Thecontent (or prompt) follows this format:
"Find this / more of this / not this / bias_value"
where bias_value is a decimal between 0 and 1.
Operators: None (semantic search with score range)
review_time
Filter by how long it took to review the label. Operators:greater_thanless_thangreater_than_or_equalless_than_or_equalbetween
sample
Filter by percentage sampling. The percentage is entered as an integer. Operators: None (percentage value)Example: Create a minimal workflow
The following example will create a basic workflow with three nodes:- Initial labeling task
- Rework (all rejected)
- Done