Skip to content

Commit

Permalink
get filenames from local dir instead of remote
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Nazareth <[email protected]>
  • Loading branch information
ryankarlos committed Dec 5, 2022
1 parent d6ae50c commit 23c8bea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flytekit/extras/tensorflow/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ def to_python_value(

uri, metadata = extract_metadata_and_uri(lv, expected_python_type)
local_dir = ctx.file_access.get_random_local_directory()
files = os.scandir(uri)
filenames = [os.path.join(local_dir, f.name) for f in files]
ctx.file_access.get_data(uri, local_dir, is_multipart=True)
files = os.scandir(local_dir)
filenames = [os.path.join(local_dir, f.name) for f in files]
return tf.data.TFRecordDataset(
filenames=filenames,
compression_type=metadata.compression_type,
Expand Down

0 comments on commit 23c8bea

Please sign in to comment.