cool-lifeguard-49380
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?agreeable-kitchen-44189
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?average-finland-92144
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.cool-lifeguard-49380
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
cool-lifeguard-49380
01/30/2024, 9:13 PMcool-lifeguard-49380
01/30/2024, 9:14 PMfreezing-airport-6809
cool-lifeguard-49380
01/30/2024, 10:04 PMdamp-lion-88352
01/31/2024, 2:35 AMdamp-lion-88352
01/31/2024, 2:39 AMdamp-lion-88352
01/31/2024, 2:40 AMaverage-finland-92144
01/31/2024, 4:43 PM