Hi team, I’m just playing around with the new resu...
# prefect-community
b
Hi team, I’m just playing around with the new result class; it looks really nice so far! Would it be possible to pass the inputs to the read/write functions also? I’d like to parameterise my filenames/targets per input. And another question, according to the docs these results are persisted to the prefect database, should I expect to see this table in the GraphQL api ?
c
Hey Brad! All great questions; there isn’t a first-class way to parametrize by inputs but I think that’s a reasonable request — if you open an issue for it we can take a look at how to support that! The biggest caveat will be that some input string representations won’t work well with filename templating but we can put some reasonable constraints on that
To extract the result locations from the GraphQL API right now is a little messy, but if you query for the
serialized_state
attribute of a task run you should be able to find the info you’re looking for. We’re going to make that more convenient in the very near future (along with better UI representations of results)
🎊 1
And actually you just reminded me I should announce the 0.11 release in #announcements !
b
Re point 1 - Yep agreed not every input will have a good str repr, but if it does the user has the choice to include it.
obviously if you try and template a random object

https://www.autodesk.com/products/fusion-360/blog/wp-content/uploads/2016/09/youre-gonna-to-have-a-bad-time.jpg

😂 1
What I’ve actually been doing is taking the module path + task name + hash of the cloud-pickled inputs to make a unique but deterministic filename
which works quite well
(if you have for example, multiple flows/users using common tasks)
c
i’m impressed by how quickly you’re exercising that API! I love it
b
but this requires the new Result class to pass the inputs through
c
yea
yea definitely open an issue; it can be our first enhancement on the API 😄
b
doing it as we speak
💯 1
c
awesome i appreciate it