Guys, I don't understand how the tab `Task inputs`...
# ask-community
f
Guys, I don't understand how the tab
Task inputs
works. I followed this example here and I still don't get it. Can someone ELI5 it to me? I don't get how certain tasks show inputs, but others dont (see screens)
1
n
hi @Federico Zambelli - this page shows, to quote the issue you referenced:
only relationships between tasks
so again going back to that issue's example
Copy code
@flow()
def exampleflow():
    # Create some futures
    one = identity.submit(1)
    two = identity.submit(2)
    three = identity.submit(3)

    identity(one) # accepts 1 task result future -> will have 1 task input
    identity([two, three]) # accepts 2 task result futures -> will have 2 task inputs (looks like your first picture)
    identity(1) # accepts zero task result futures, will look like your second picture i.e. {x=[]}
    identity([2, 3]) # accepts zero task result futures, will look like your second picture i.e. {x=[]}
so basically, task "inputs" are references to upstream task results that are passed into the task you're looking at - does that make sense?
🙏 1
f
Ah yes that makes more sense. I was expecting that any input passed to the task args would show up. Thanks for the explanation!
I'm gonna ask maybe a provocative question: wouldn't it make more sense if it showed any input passed to the task? E.g. i have a task that parses a subreddit based on subreddit name and start and end date. But the parameters come from the flow, so the "task inputs" is always empty, ofc:
n
at this time, we don't display the actual values of the task args - though that has definitely been many folks expectation of "Task Inputs" It gets a little tricky since many folks would not be comfortable surfacing task args plaintext in the UI for data sensitivity reasons - though yes, in some cases it would be more convenient than logging select values you'd like to see in the UI
f
It gets a little tricky since many folks would not be comfortable surfacing task args plaintext in the UI for data sensitivity reasons
ah this makes sense. thanks for the insights!
n
i should actually be a little more explicit, and say that values passed to tasks are never even sent to the Prefect API, in contrast to flow parameters. here's a thread on this subject in the past where this is discussed
f
Got it, good to know. I have another question since you're here if you don't mind. When I write a task description, where is this supposedly shown in the web UI ? I can't find it anywhere
n
hmm I don't believe we actually surface task descriptions in the UI
f
Ah alright, then I'm not sure I understand the purpose besides a regular docstring 😅.
n
Let me get back to you on this! I think it'd make sense to surface task descriptions on the task run page, will discuss this with the team (seems this may have been alluded to here)
🙌 1