Hello! Maybe this is a known thing, but does the F...
# ask-the-community
a
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
UI might not support that, FlyteFile has a specific input format i think. You can submit it from FlyteRemote right
a
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
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
Nice!! That worked!
j
ohh that is awesome, thanks for the format 😄 i assume
1
is for FlyteDirectory
k
yup. you’re right
d
@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
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.
153 Views