Adithya Ramanathan11/17/2020, 3:07 PM
file in storage when submitting a flow to the server, versus the serialized variant of a flow that is used to register with the GraphQL API? To motivate the reasoning, we have a need to directly invoke the GraphQL API, and are therefore manually serializing flows ourselves. As per our current understanding, we also need to build the
file in storage and make sure that is referenced in the serialization, but given the fact that the
are captured in the serialized flow anyway, we were curious as to what the
file is used for, what other information is captured there? Mainly trying to understand why, rather than perhaps build a work around of any kind. Thanks in advance!
josh11/17/2020, 3:18 PM
file is a flow that is pickled using cloudpickle. Essentially it is bytecode returned from
. Take a look at the flow’s save function that does this. Also worth pointing out that if you’re calling the GraphQL API directly to invoke flow registration and performing serialization yourself there’s a possibility that you may be able to benefit from storing your flow as a script instead of a pickle https://docs.prefect.io/core/idioms/file-based.html 🙂
Adithya Ramanathan11/17/2020, 3:21 PM
both serialize and `cloudpickle.dump`/store as a python script? Why doesn’t the agent get/use the serialization itself to execute the flow?
josh11/17/2020, 3:28 PM
Adithya Ramanathan11/17/2020, 3:59 PM
josh11/17/2020, 4:12 PM
Adithya Ramanathan11/17/2020, 4:12 PM
josh11/17/2020, 4:16 PM
Adithya Ramanathan11/17/2020, 4:17 PM