shy-accountant-549
03/20/2023, 3:23 PM@task
def t1() -> FlyteFile:
# do something and save checkpoint to path/to/file
return FlyteFile("path/to/file")
def t2(input: FlyteFile) -> float:
checkpoint = torch.load(input)
# do something
return 1.0
@workflow
def wf() -> float:
t1_output = t1()
return t2(t1_output)
when executed, t1 output is stored in S3. In t2 I get the following error
[Errno 2] No such file or directory: '/tmp/flytemlfm4mk1/local_flytekit/0569821759669848f705b8863309a4bb/checkpoint-epoch0001.pth'
it seems flyte dowloaded the file from S3 to a local temp folder, not sure why the file does not exist. any ideas?gray-ocean-62145
03/20/2023, 3:28 PMdef t2(input: FlyteFile) -> float:
input_path = input.download()
checkpoint = torch.load(input_path)
# do something
return 1.0
Try this.. calling download on the input