Draft
Conversation
- Add max_parallel_downloads configuration to Cache class (default: 4) - Extract download logic into _download_and_read_parquet helper function - Implement parallel downloads using ThreadPoolExecutor - Maintain file ordering by extracting index from filenames - Keep serial processing for single files or when max_workers=1 - Update progress bar to track completion of parallel downloads Co-authored-by: jhamon <jhamon@pinecone.io>
- Add unit tests for parallel download configuration - Test file index extraction from filenames - Verify correct ordering of files after parallel downloads - Test both serial and parallel processing paths - Verify max_workers limits are respected - All 8 new tests pass Co-authored-by: jhamon <jhamon@pinecone.io>
|
Cursor Agent can help with this pull request. Just |
Co-authored-by: jhamon <jhamon@pinecone.io>
- Remove unused imports (Mock, call, pytest) - Fix import ordering - Replace typing.Tuple with builtin tuple for Python 3.10+ compatibility - Update .gitignore to exclude __pycache__ directories Co-authored-by: jhamon <jhamon@pinecone.io>
59a671d to
2f65aa5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement parallel downloading for multi-file datasets to significantly improve loading performance.
Previously, datasets with multiple parquet files downloaded serially, leading to long load times (e.g., 70-80 seconds for 10 files). This change introduces
ThreadPoolExecutorto download files concurrently, reducing load times by 3-4x and better utilizing network bandwidth. It includes configurable parallel workers, maintains existing error handling, and ensures correct file ordering.Linear Issue: SDK-326