Jons Cyriac12/22/2022, 5:03 AM
Jeff Hale12/23/2022, 2:40 PM
Jons Cyriac12/26/2022, 6:07 AM
flow = load_flows_from_script(path=str(path))
It works fine if im importing the flow directly.
File "/usr/local/lib/python3.9/site-packages/prefect/deployments.py", line 696, in build_from_flow module = importlib.import_module(mod_name) File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1030, in _gcd_import File "<frozen importlib._bootstrap>", line 1007, in _find_and_load File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked ModuleNotFoundError: No module named '__prefect_loader__'
Jeff Hale12/28/2022, 6:47 PM
Jons Cyriac12/29/2022, 2:36 AM
pythonically before calling
Jeff Hale12/29/2022, 5:09 PM
is an environment variable for the client. You can just set it on the client directly from the CLI.
Jons Cyriac01/03/2023, 2:29 AM
(i prefer this since im multiple orion instances for our ci/cd)
from prefect.client.client import Client client = Client(api_server="***") build_and_register(client, flow, project_id, schedule=False)
Jeff Hale01/03/2023, 3:19 AM
decorator might be worth checking out. You can see the source code here. I’ll ask folks who are more familiar with that part of the code base than me if they have any insights tomorrow, Tuesday, when they are expected to be available and will report back. In the meantime, if you’d be so kind as to remove your message on this topic in the #prefect-community channel to keep it tidy, that would be great.
Christopher Boyd01/03/2023, 1:54 PM
import os os.environ["PREFECT_API_URL"] = "<address>"
Jons Cyriac01/09/2023, 11:57 AM