square-agency-59624
06/16/2025, 3:20 PMfrom datetime import timedelta
import typing
import union
from flytekit import wait_for_input
from tasks.simple_tasks import say_hello_name_task
@union.task
def create_report(data: typing.List[float]) -> dict:
"""A toy report task."""
return {
"mean": sum(data) / len(data),
"length": len(data),
"max": max(data),
"min": min(data),
}
@union.task
def finalize_report(report: dict, title: str) -> dict:
return {"title": title, **report}
@union.workflow
def simple_hitl_workflow():
report = create_report(data=[1.0, 2.0, 3.0, 4.0, 5.0])
title_input = wait_for_input("title", timeout=timedelta(hours=1), expected_type=str)
return finalize_report(report=report, title=title_input)
jolly-florist-66728
06/16/2025, 3:20 PMwait_for_input
is stuck in the "queued" state, it usually means the workflow is correctly paused and waiting for an external input, but the input has not yet been provided. To proceed, you must supply the required input (e.g., the "title") via the Flyte UI or programmatically using FlyteRemote. This is expected behavior for human-in-the-loop (HITL) workflows using `wait_for_input`βthe node will remain queued until the input is received, after which execution continues. See the official guide for details.
If you have already provided the input and it is still stuck, double-check that you are using the correct node name and that the input is submitted through the UI or via the FlyteRemote.set_signal
method. Would you like more detail on how to provide the input through the UI or programmatically?
Sources:
- Supply external inputs with wait_for_input π 0 button π 0 button π‘ Hint: Mention @runllm in the thread for followups.square-agency-59624
06/16/2025, 3:25 PMjolly-florist-66728
06/16/2025, 3:25 PMwait_for_input
node, it may be due to a UI limitation or a misconfiguration in your workflow. The UI should display a modal form for input when the node is selected, as described in the official documentation. If this is not happening, ensure your workflow is registered and running on a supported Flyte deployment, and that the node name matches what the UI expects.
Additionally, there have been past issues where the UI did not render input forms for certain types or complex inputs, but these have been addressed in recent versions (see issue #3456). If you are using a custom or unsupported input type, or an outdated Flyte Console, the input form may not appear.
Would you like more detail on troubleshooting or checking your workflow and UI version?
Sources:
- Waiting for external inputs: UI input form
- see issue #3456 π 0 button π 0 button π‘ Hint: Mention @runllm in the thread for followups.square-agency-59624
06/16/2025, 3:27 PMsquare-agency-59624
06/16/2025, 3:27 PMjolly-florist-66728
06/16/2025, 3:27 PMwait_for_input
node is the same as in Flyte OSS: the UI should present a form to enter the value when the workflow execution is paused at the input node. If you do not see this option, it may be due to a UI bug, a version mismatch, or the node not being properly recognized as a gate node. The Union Serverless documentation confirms that the UI should allow you to resume execution by entering the required input.
If the UI still does not show the input form, you can use the FlyteRemote.set_signal
method as a workaround to programmatically provide the input. Would you like step-by-step instructions for using FlyteRemote to set the signal?
Sources:
- Union Serverless: Supply external inputs with wait_for_input π 0 button π 0 button π‘ Hint: Mention @runllm in the thread for followups.square-agency-59624
06/16/2025, 3:32 PMjolly-florist-66728
06/16/2025, 3:33 PMwait_for_input
node in Union Serverless, use the FlyteRemote.set_signal
method. This allows you to set the value for the input node even if the UI does not present a form. The process is as follows:
1. Initialize a FlyteRemote
instance with your Union Serverless config.
2. Fetch the workflow and execute it (or fetch the execution if already running).
3. List available signals for the execution.
4. Use set_signal
to provide the required input for the node.
Example code:
from flytekit.remote.remote import FlyteRemote
from flytekit.configuration import Config
remote = FlyteRemote(
Config.for_endpoint("https://serverless.union.ai"), # Use your endpoint
default_project="your_project",
default_domain="development",
)
# Fetch the workflow (replace with your workflow name)
flyte_workflow = remote.fetch_workflow(name="your_workflow_name")
# Start execution (or fetch an existing execution)
execution = remote.execute(flyte_workflow, inputs={"data": [1.0, 2.0, 3.0, 4.0, 5.0]})
# List available signals (input nodes waiting for values)
signals = remote.list_signals(execution.id.name)
# Set the signal value for the "title" node
remote.set_signal("title", execution.id.name, "My Custom Title")
For more details, see the official guide.
Sources:
- Waiting for external inputs: Using FlyteRemote π 0 button π 0 button π‘ Hint: Mention @runllm in the thread for followups.