<#3694 [BUG] Dask Plugin Resource Assignment Regre...
# flyte-github
a
#3694 [BUG] Dask Plugin Resource Assignment Regression Issue created by hamersaw Describe the bug Task resources are not correctly assigned when supplied to Dask tasks. This seems to be caused by this PR. Basically, we were setting the resource overrides on the container to the containers resources, which is what made this approach work. However, now the resource overrides are completely empty (unless populated when this task is called from a workflow with
.with_overrides(...)
of course, so this is overriding the platform resources with an empty set. I think we can fix this by updating the defaultResources here to be
defaultContainerSpec.Resources
like is now done in the container helper code. Then we update this line to use ResourceCustomizationModeMergeExistingResources which will merge the container resources with overrides and then apply the defaults if none are set. Expected behavior Resource requests and limits should be correctly applied. Additional context to reproduce The following Dask task:
Copy code
@task(
    task_config=Dask(
        workers=WorkerGroup(
            number_of_workers=10,
        ),
    ),
    cache_version="1",
    cache=True,
)
def hello_dask_2(size: int) -> float:
    # Dask will implicitly create a Client in the background by calling Client(). When executing
    # remotely, this Client() will use the deployed ``dask`` cluster.

    array = da.random.random(size)
    return float(array.mean().compute())
results in empty requests and resources. Screenshots No response Are you sure this issue hasn't been raised already? ☑︎ Yes Have you read the Code of Conduct? ☑︎ Yes flyteorg/flyte