Assaf Ben Shimon
04/24/2022, 3:24 PMTraceback (most recent call last):
File "/app/biomarkers/extract_markers_image.binary.runfiles/biomarkers/biomarkers/dockers/extract_markers.py", line 2, in <module>
from biomarkers.batch_processing import orchestrator
File "/app/biomarkers/extract_markers_image.binary.runfiles/biomarkers/biomarkers/batch_processing/orchestrator.py", line 130, in <module>
seq_markers_extraction_flow.register("neuralight-research")
File "/usr/local/lib/python3.9/site-packages/prefect/core/flow.py", line 1708, in register
registered_flow = client.register(
File "/usr/local/lib/python3.9/site-packages/prefect/client/client.py", line 839, in register
project = self.graphql(query_project).data.project # type: ignore
File "/usr/local/lib/python3.9/site-packages/prefect/client/client.py", line 452, in graphql
result = <http://self.post|self.post>(
File "/usr/local/lib/python3.9/site-packages/prefect/client/client.py", line 407, in post
response = self._request(
File "/usr/local/lib/python3.9/site-packages/prefect/client/client.py", line 649, in _request
raise AuthorizationError(
prefect.exceptions.AuthorizationError: Malformed response received from Cloud - please ensure that you are authenticated. See `prefect auth login --help`.
Any idea what can cause it? I've already authenticated using my API keyAnna Geller
orchestrator.py?
Also, if you are just getting started with Prefect, you may want to start with Prefect 2.0 directlyAssaf Ben Shimon
04/24/2022, 3:32 PMflow_name.register("project-name") , do I need to do anything else? (also, I run the code from docker, if that changes anything)Anna Geller
export PREFECT__CLOUD__API_KEY="your_key"Assaf Ben Shimon
04/24/2022, 4:02 PMAssaf Ben Shimon
04/24/2022, 4:15 PMprefect server start a local server starts and I can see the UI, but nothing updates there and I can't see my flows.
So what's the right way to glue these pieces together?
Thanks a lot in advance!!Anna Geller
Anna Geller
I've tried running a local agent from the CLI, but that doesn't seem to be enough as I need to somehow register my flows so that it'll track them, right?Yup exactly - you start an agent with e.g. label "dev" and you attach the same label to your
flow.run_config and when you then register and run your flow, it will match it with the agent via a label. This page explains it more for 1.0
you can also check this Discourse topic with links to resources that will help understand various conceptsAssaf Ben Shimon
04/24/2022, 8:23 PMAssaf Ben Shimon
04/24/2022, 8:28 PMAssaf Ben Shimon
04/24/2022, 8:40 PMprefect server start --expose), but no change 😕Kevin Kho
[server]
[server.ui]
apollo_url = "<http://YOUR_MACHINES_PUBLIC_IP:4200/graphql>"
in the config.toml before doing the prefect server start --expose? Looks really weird why it’s nullAssaf Ben Shimon
04/24/2022, 9:59 PM~/.prefect/config.toml )Anna Geller
server,
• adjust (or create if not available) your ~/.prefect/config.toml and then try accessing the UI
if you still have trouble, check those Discourse topics:
• https://discourse.prefect.io/t/how-to-deploy-self-hosted-server-and-register-first-flows-to-the-server-backend/85
• https://discourse.prefect.io/t/can-t-connect-to-a-prefect-server-from-other-machine-despite-port-4200-being-open/128