Fabio Grätz
01/30/2024, 2:55 PM@task(
requests=Resources(
cpu="3",
mem="3Gi",
),
)
def foo():
...
@workflow
def my_wf():
foo().with_overrides(
requests=Resources(
cpu="5",
mem="5Gi",
),
)
It just took me a while to figure out why this task pod ends up requesting 3 cpus/3Gi of memory instead of 5/5 which I would have expected.
The reason is that the task is registered with limits=requests and then the override requests are larger than the original limits which is prevented here.
I find this rather unintuitive. I think we should either automatically override the limits as well or log a warning that the user should override the limits too.
Do you agree that this is unintuitive and if yes, which option do you think is better?Bernhard Stadlbauer
01/30/2024, 4:41 PM@task(
requests=Resources(
cpu="3",
mem="3Gi",
),
limits=Resources(
cpu="3",
mem="3Gi",
),
)
def foo():
...
@workflow
def my_wf():
foo().with_overrides(
requests=Resources(
cpu="5",
mem="5Gi",
),
)
As there’s probably no way to know whether limits
have been set in the first place?David Espejo (he/him)
01/30/2024, 5:07 PMThe reason is that the task is registered with limits=requestsRight, I think this is the case especially if no
limits
are specified.
In any case, I'd + the idea of warning the user. I think it's a bit more deterministic at scale than automatically overriding the limits.Fabio Grätz
01/30/2024, 9:04 PMAs there’s probably no way to know whetherIf no limits have been set explicitly, the requests are taken also as limits.have been set in the first place?limits
Fabio Grätz
01/30/2024, 9:13 PMFabio Grätz
01/30/2024, 9:14 PMKetan (kumare3)
Fabio Grätz
01/30/2024, 10:04 PML godlike
01/31/2024, 2:35 AML godlike
01/31/2024, 2:39 AML godlike
01/31/2024, 2:40 AMDavid Espejo (he/him)
01/31/2024, 4:43 PM