Skip to content

Workflows kinds

In Workflows, some values cannot be defined when the Workflow Definition is created. To address this, the Execution Engine supports selectors, which are references to step outputs or workflow inputs. To help the Execution Engine understand what type of data will be provided once a reference is resolved, we use a simple type system known as kinds.

Kinds are used to represent the semantic meaning of the underlying data. When a step outputs data of a specific kind and another step requires input of that same kind, the system assumes that the data will be compatible. This reduces the need for extensive type-compatibility checks.

For example, we have different kinds to distinguish between predictions from object detection and instance segmentation models, even though representation of those kinds is sv.Detections(...). This distinction ensures that each block that needs a segmentation mask clearly indicates this requirement, avoiding the need to repeatedly check for the presence of a mask in the input.

Note

As for now, kinds are such simplistic that do not support types polymorphism - and developers are asked to use unions of kinds to solve that problem. As defining extensive unions of kinds may be problematic, this problem will probably be addressed in Execution Engine v2.

Warning

In inference release 0.18.0 we decided to make drastic move to heal the ecosystem from the problem with ambiguous kinds names (Batch[X] vs X - see more here).

The change is breaking only if there is remote Workflow plugin depending on imports from inference.core.workflows.execution_engine.entities.types module, which is not the case to the best of our knowledge. We removed problematic kinds as if they never existed in the ecosystem and fixed all blocks from roboflow_core plugin. If there is anyone impacted by the change - here is the migration guide.

Kinds declared in Roboflow plugins