Condition
Overview
Checks one value and lets the flow continue only when the check holds. The check can compare text, a number, or a yes/no, so you can branch on a name like a winning framework as easily as on a score or a count.
Every edge leaving it shows a branch chip. The first edge you add is Yes and runs when the check holds; the next one is No and runs when it fails. Click a chip to switch an edge’s branch. One Condition then works as an if/else.
The node shows its check on the canvas, such as If winner = yolo, and after each run the value it read as a badge, such as Value: yolo.
For one yes/no check like this a Condition is enough. When there are more outcomes, use a Router.
How it works
FAQ
What happens when the check fails?
Nodes on its No edges run; every other node connected after it does not. Without a No edge the flow stops at this node. Work already finished upstream is kept.
Which comparisons can the check use?
The same ones as the Router. Text: Equal to, Not equal to, One of (a list), Contains, Starts with, Is empty; upper and lower case and spaces around the text don’t matter. Number: =, ≠, >, <, ≥, ≤, and Between, with both ends included; a count badge like 1,250 images is read by its leading number. Yes / No: Is true, Is false; values like yes/no, true/false, and 1/0 work too.
What if the item is empty or not the right type?
The check fails, unless it is Is empty. The same goes for a value that can’t be read as the chosen type, such as abc compared as a number.
Where does the checked item come from?
From any upstream output wired into Item to check, number outputs included: a metric, a count, or a name such as the winning framework.
Can I check a dataset?
Yes. Wire a dataset into Item to check, then pick what to count: Assets, Objects, Classes, or Objects of class with one class, such as car. Then compare the count as a number, for example Objects of car > 100. The node counts the dataset as it is when the flow reaches it, so objects labeled by hand in the labeling tool count too. The badge shows the count, such as Objects of car: 120.
Inputs
Value being tested, usually wired from an earlier node’s output such as a score, a count or a name. A count badge like 1,250 images is read as a number by its leading number. A wired dataset is checked by a count - its assets, objects or classes. Key: ITEM_TO_CHECK.
How the item is read - as text, a number or a yes/no - and what it is compared with. Flow continues while the check holds, and stops when it does not. Flow variables aren’t accepted. Values come from ITEM_TO_CHECK. Key: RULE.
Outputs
What the check read from the item - its number, or the raw text. Written on every run, whether the check passes or fails. Shown on the node as a badge. Key: VALUE.
JSON config
Machine-readable node interface for automation and advanced usage.