Nan Qin03/20/2023, 3:23 PM
when executed, t1 output is stored in S3. In t2 I get the following error
@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)
it seems flyte dowloaded the file from S3 to a local temp folder, not sure why the file does not exist. any ideas?
[Errno 2] No such file or directory: '/tmp/flytemlfm4mk1/local_flytekit/0569821759669848f705b8863309a4bb/checkpoint-epoch0001.pth'
Michael Tinsley03/20/2023, 3:28 PM
Try this.. calling download on the input
def t2(input: FlyteFile) -> float: input_path = input.download() checkpoint = torch.load(input_path) # do something return 1.0