https://prefect.io logo
r

Robin

09/30/2020, 9:10 AM
Hey all, is there a way to set the
min_workers
and
max_workers
as flow parameters, such that they can be changed from the cloud ui?
Copy code
flow.environment = DaskKubernetesEnvironment(
        min_workers=20, max_workers=30, labels=["k8s"]
    )
✔️ 1
j

josh

09/30/2020, 1:14 PM
Hey @Robin currently there isn’t a way to control those values based on Parameters. This is mainly due to the environment existing out of the context of the run (e.g. the environment provisions infrastructure then the run happens in that infra)
r

Robin

09/30/2020, 1:16 PM
OK, was afraid you say so. Any plans of adding a layer in between to avoid having to register the flow again and again just to change those two values?
j

josh

09/30/2020, 1:19 PM
Hmm as it stands right now registering your flow as a script might allow this because you can save new versions of the flow without having to reregister as long as the structure of the flow hasn’t change but tbh I have not tried it for changing environment kwargs https://docs.prefect.io/core/idioms/file-based.html
We are experimenting with a new RunConfig pattern in place of environments but not sure if we are making them editable from the backend, will check on that
r

Robin

09/30/2020, 3:44 PM
OK, more than enough answers for the moment. We will wait patiently! 🙂