https://flyte.org logo
#ask-the-community
Title
# ask-the-community
a

Ailin Yu

11/30/2022, 6:39 PM
Hello! Maybe this is a known thing, but does the Flyte UI not support inputs of
List[Type]
where the
Type
is complex? Or maybe I’m just specifying my input incorrectly: I specifically have a workflow with an input
List[FlyteFile]
that is passing that input to task that takes a
List[FlyteFile]
. When I try to run this workflow through the Flyte UI, passing an input like
["test_file.txt"]
and the workflow starts running, the UI shows that this was my input:
Copy code
{
  "test_list": [
    "(empty)"
  ]
}
So as you can imagine, the workflow then fails to run:
Copy code
Message:

    Cannot convert from scalar {
  none_type {
  }
}
 to <class 'flytekit.types.file.file.FlyteFile'>

SYSTEM ERROR! Contact platform administrators.
(More details in thread)
I gave this a test in the sandbox to make sure the same thing happened there too, I just modified the
hello_world
one slightly:
Copy code
@task
def say_hello(test_list: List[FlyteFile]) -> str:
    return "hello world

@workflow
def my_wf(test_list: List[FlyteFile]) -> str:
    res = say_hello(test_list=test_list)
    return res
And then registered:
Copy code
pyflyte -c ~/.flyte/config-sandbox.yaml register --version ref2 core/flyte_basics/hello_world.py
And this was my result
j

Jay Ganbat

11/30/2022, 6:55 PM
UI might not support that, FlyteFile has a specific input format i think. You can submit it from FlyteRemote right
a

Ailin Yu

11/30/2022, 7:03 PM
Ah gotcha, that makes sense. Yeah I can give that a test, I have a workflow calling this one as a subworkflow that I tested with too, and it was able to run successfully, so it definitely seems like a UI thing from that
k

Kevin Su

11/30/2022, 7:15 PM
Could you try to pass below value as input on the Flyte Console
Copy code
[{
  "dimensionality": 0,
  "uri": "<s3://bucket/test_file.txt>"
}]
"dimensionality": 0
means it’s a blob file
a

Ailin Yu

11/30/2022, 7:41 PM
Nice!! That worked!
j

Jay Ganbat

11/30/2022, 7:43 PM
ohh that is awesome, thanks for the format 😄 i assume
1
is for FlyteDirectory
k

Kevin Su

11/30/2022, 7:43 PM
yup. you’re right
d

Dan Rammer (hamersaw)

11/30/2022, 11:14 PM
@Kevin Su do we have this documented somewhere? Specifically the input strings for different types in the UI? I think it could be very useful.
k

Kevin Su

11/30/2022, 11:23 PM
We don’t have doc now, but we should add it. However, you could see the correct format on the console when you specify default input for the workflow. After you register a workflow that has default input, you’ll see the default format on the UI when launching the workflow.
68 Views