<@U04664Z7H37> - I think the problem is torch.elastic uses `pickle` instead of `cloudpickle` this wo...
f
@cool-lifeguard-49380 - I think the problem is torch.elastic uses
pickle
instead of
cloudpickle
this works
Copy code
from flytekit import task
import cloudpickle

@task(cache=True, cache_version="1.0")
def foo(i: int) -> int:
    return i

foo(i=10)
p = cloudpickle.dumps(foo)
f = cloudpickle.loads(p)
f(i=10)
150 Views