YD
09/19/2023, 4:11 PMprefect deployment build my_flow.py:flow_name -q que1 --tag LIN --name proj_name --skip-upload --pool "default-agent-pool"
and I get en error:
encountered an exception: ModuleNotFoundError("No module named 'my_project_source")
I tried to add everywhere where that are imports in the project, from other parts of the project
from pathlib import Path
import sys
import os
path = Path(os.path.dirname(__file__))
sys.path.append(path)
sys.path.append(path.parent)
but this did not help
do I have to create a python package from the code in order to deploy it?
if there is a way to deploy a project without turning it to a python package, what is it ?
I do not see in https://docs.prefect.io/latest/concepts/deployments/
information on prefect deployment build
was this deprecated ?YD
09/19/2023, 4:25 PMYD
09/19/2023, 4:29 PMYD
09/20/2023, 5:31 AMYD
09/20/2023, 5:37 AMYD
09/20/2023, 5:56 AMprefect deployment build
and use
if __name__ == "__main__":
my_flow.serve(...)
instead ?
if so, do we need to remove the .serve
after deploying, if we want to make changes and run code like any other python code?Nate
09/21/2023, 11:44 PM