Thread
#prefect-community
    Robin

    Robin

    1 year ago
    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?
    flow.environment = DaskKubernetesEnvironment(
            min_workers=20, max_workers=30, labels=["k8s"]
        )
    j

    josh

    1 year ago
    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)
    Robin

    Robin

    1 year ago
    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

    1 year ago
    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
    Robin

    Robin

    1 year ago
    OK, more than enough answers for the moment. We will wait patiently! 🙂