We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently, FlyteDirectory doesn't support os.listdir with a remote S3 path (fortunately, a local path works!). The error is shown as follows:
FlyteDirectory
os.listdir
Though FlyteDirectory provides listdir method itself, I just think os.listdir could provide a better UX.
listdir
A FlyteDirectory with a remote S3 path can be walked through by os.listdir, as commented here
Create a demo dir on minio and add a text file first. Then, run the following script:
demo
import os from flytekit import task from flytekit.types.directory import FlyteDirectory S3_DIR = "s3://my-s3-bucket/demo @task def create_fd() -> FlyteDirectory: fd = FlyteDirectory(path=S3_DIR) entities = os.listdir(fd) for e in entities: # Suppose there's no subdir with open(os.path.join(S3_DIR, e), "r") as f: print(f.read()) return fd if __name__ == "__main__": fd = create_fd() print(fd)
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
Currently,
FlyteDirectory
doesn't supportos.listdir
with a remote S3 path (fortunately, a local path works!). The error is shown as follows:Though
FlyteDirectory
provideslistdir
method itself, I just thinkos.listdir
could provide a better UX.Expected behavior
A
FlyteDirectory
with a remote S3 path can be walked through byos.listdir
, as commented hereAdditional context to reproduce
Create a
demo
dir on minio and add a text file first. Then, run the following script:Screenshots
No response
Are you sure this issue hasn't been raised already?
Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: