Giovanni Giacco
02/08/2021, 11:50 PMflow.storage = Docker(registry_url="702*****<http://487.dkr.ecr.eu-central-1.amazonaws.com|487.dkr.ecr.eu-central-1.amazonaws.com>", image_tag='latest', python_dependencies=["dask_kubernetes"])
flow.run_config = KubernetesRun()
flow.executor = DaskExecutor(
cluster_class=lambda: KubeCluster(make_pod_spec(image=prefect.context.image)),
adapt_kwargs={"minimum": 3, "maximum": 5},
)
flow.register(project_name="AWS_Prefect_Kubernetes")
But I get the following error:
Unexpected error: AttributeError("can't set attribute")
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/prefect/engine/runner.py", line 48, in inner
new_state = method(self, state, *args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/prefect/engine/flow_runner.py", line 418, in get_flow_run_state
with self.check_for_cancellation(), executor.start():
File "/usr/local/lib/python3.8/contextlib.py", line 113, in __enter__
return next(self.gen)
File "/usr/local/lib/python3.8/site-packages/prefect/executors/dask.py", line 211, in start
with self.cluster_class(**self.cluster_kwargs) as cluster: # type: ignore
File "C:/Users/giova/Git_Projects/PentaTechnology/earthalytics-engine/dask-flow-new.py", line 48, in <lambda>
File "/usr/local/lib/python3.8/site-packages/dask_kubernetes/core.py", line 414, in __init__
super().__init__(**self.kwargs)
File "/usr/local/lib/python3.8/site-packages/distributed/deploy/spec.py", line 274, in __init__
super().__init__(
File "/usr/local/lib/python3.8/site-packages/distributed/deploy/cluster.py", line 69, in __init__
self.name = str(uuid.uuid4())[:8]
AttributeError: can't set attribute
Any advice? It seems it's not be able to set the name of the pod into the cluster. I'm using Prefect 0.14.6.Kyle Moon-Wright
02/09/2021, 12:34 AMdask-kubernetes
library (or at the very least not on the Prefect side) so I would recommend opening an issue there to find a better path forward, though it looks like they recommend downgrading in the meantime.Giovanni Giacco
02/09/2021, 9:14 AM