lance-format / lance-format/lance
Grabbing whole dataset from s3 currently slow (possibly other cloud blob storage)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7.1k
- Forks
- 852
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 272
Description
We use metaflow for orchestration of many of our ML tasks, and they have something that if you specify a path in s3 will grab the data extremely fast as it's done in parallel. It can't do a lot of the things like lance that allow filtering or selection of specific columns, but I think the download method on lance backend could change dependant on what you are trying to do? This is the code normally used for metaflow and I think if a filtering clause isn't specified you could implement something similar:
with S3(s3root=f"{source_s3_base_path}") as s3:
files = s3.get_all()
return pd.concat([pd.read_parquet(file.path) for file in files])
Just pointing it out because if you are outputting daily new fragments to append to the data. It's quite slow grabbing the whole dataset, where effectively the same operation using the code above is 20x~30x faster. This would get tricky with filtering or even specifying columns I think. Anyways, I can further point to the above code but just a possible future optimization especially if someone wants to pull down the whole dataset from blob storage. A caveat is this does download all those chunks in parallel to disk and then load them in, so you would need ample disk space.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No implementation file, entry point, or test is named. Start by locating the Lance backend path used to load an entire S3 dataset and compare it with the Metaflow S3 get_all example. Done requires an agreed scope for unfiltered reads versus filtering or column selection, plus tests demonstrating the intended behavior and performance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, pandas, python
- Domain
- cloud, data-engineering, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100