Tarmily Wen12/02/2022, 6:15 PM
Dan Rammer (hamersaw)12/02/2022, 6:23 PM
that allows you to set task resources. To do this dynamically you'll have to run the task within a dyanmic task, which can then analyze the inputs and assign correct resources. For example:
Very toy example, probably syntactically incorrect, but I'm sure you get the idea.
@task def foo(a: int) -> int: return a @dynamic def bar(a: int) -> int: if a == 1: return foo(a=a).with_overrides( requests=Resources(cpu="6", mem="500Mi") ) return foo(a=a) @workflow def bar(a: int) -> int: return bar(a=a)