Skip to content
New issue

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

Convert index_tar to a new-style generator #439

Closed
rlamy opened this issue Sep 13, 2024 · 0 comments · Fixed by #440
Closed

Convert index_tar to a new-style generator #439

rlamy opened this issue Sep 13, 2024 · 0 comments · Fixed by #440

Comments

@rlamy
Copy link
Contributor

rlamy commented Sep 13, 2024

Though we have process_webdataset, we also need a simple generator that just returns File objects for each member of an archive similarly to the old-style UDF index_tar.

Usage should look like:

chain = DataChain.from_storage("s3://my-bucket").filter(C("file.path").glob("*.tar").gen(file=process_tar)

This would allow us to test tar file handling in datachain.lib (which we're not currently doing, as mentioned in #412), and I consider it a blocker for #438 and #367.

@rlamy rlamy self-assigned this Sep 13, 2024
rlamy added a commit that referenced this issue Sep 13, 2024
This is a replacement for the deprecated index_tar() UDF.
Also removes unused TarStream class.

Fixes #439
rlamy added a commit that referenced this issue Sep 13, 2024
This is a replacement for the deprecated index_tar() UDF.
Also removes unused TarStream class.

Fixes #439
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant