proud-answer-87162
04/24/2024, 4:25 PMpyflyte
works with custom dependencies and a custom docker image. if i install custom dependencies in my venv and then run pyflyte run --remote --image {myRemoteImage} --project flyte workflows/myworkflow.py myworkflowname
things work as expected. but if i uninstall the custom dependencies locally pyflyte run
(and register
and package
) complain about the dependencies not existing.
obviously those dependencies are required when the workflow is run remotely, which is why they are included in myRemoteImage
. but why are they needed for the register
command, and why must they be installed locally? the documentation says:
Packages and zips up the directory/file that you specify as the argument to pyflyte register, along with any files in the root directory of your project. The result of this is a tarball that is packaged into a .tar.gz file, which also includes the serialized task (in protobuf format) and workflow specifications defined in your workflow code.
proud-answer-87162
04/24/2024, 4:33 PMpackage
contains the serialized tasks and workflows but does not contain any custom dependencies. so are local dependencies only required as some form of validation during serialization?proud-answer-87162
04/24/2024, 4:34 PMhigh-park-82026
@workflow
functions... so any packages/modules that are needed for loading or for running the @workflow
function (with no inputs) need to exist at the registration timeproud-answer-87162
04/24/2024, 7:58 PMhigh-park-82026
pyflyte register
or flytectl register files
and that will bypass the python checks/validations. That full spec is in protobuf.
We do have a product in union.ai that allows you to design the workflow fully in the browser (drag-drop style) and rely on the registration API to surface any compilation errors...proud-answer-87162
04/25/2024, 2:20 PMpyflyte run -d production --remote --image...
and have a different local dependency version installed than what actually gets used when the workflow execution runs?high-park-82026