Repository navigation
Configurable fsspec reads and coalescing block cache - #3
Closed
CodyCBakerPhD wants to merge 1 commit into
Closed
CodyCBakerPhD wants to merge 1 commit into
CodyCBakerPhD wants to merge 1 commit into
Conversation
- `DatasetAdapter` takes `fsspec_options`, passed to fsspec's `HTTPFileSystem` (`block_size`, `cache_type`, `cache_options`), and `FsspecAdapter` passes it along. - New `datalad_fuse.caching.CoalescingBlockCache`, registered with fsspec as `"coalescing-blockcache"`: like fsspec's `"blockcache"` (least recently used blocks, suited to HDF5's reads of small pieces scattered over a file, which fsspec's default read-ahead cache keeps discarding), but fetching each run of consecutive missing blocks with one request rather than one request per block. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qn5WBSiQgoZoL4fytF6nEr
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.
On the latest
dandi-cliPRs for streaming validation, we are found the resulting inefficiency:I will attempt to open a PR on
fsspecfor the new block cache, but no guarantee they will accept or merge that. If they do, I'll come back and reduce the custom code for that added here.🤖 AI text below 🤖
Changes
DatasetAdaptertakesfsspec_options, which are passed to fsspec'sHTTPFileSystem(block_size,cache_type,cache_options).FsspecAdapterpasses them along.datalad_fuse.caching.CoalescingBlockCache, registered with fsspec as"coalescing-blockcache"."blockcache", it keeps the least recently used blocks. That suits HDF5's reads of small pieces scattered over a file, which fsspec's default 5 MiB read-ahead cache keeps discarding."blockcache", it fetches each run of consecutive missing blocks with one request, instead of one request per block.BlockCachedoes the same (TODO: update target BlockCache: fetch each run of consecutive missing blocks with one request filesystem_spec#1).Split out of #2, together with #4 (opt-out of initializing git-annex). Both PRs add a parameter to
DatasetAdapter.__init__, so whichever lands second has a small conflict there: keep both parameters.The parameter name
fsspec_optionsmatches the variant based on datalad#131, so callers look the same with either. Whichever of this and datalad#131 lands second needs its conflicts resolved: the same few lines move fromDatasetAdapter.__init__infsspec.pytoFsspecBackend/adapter.py.Tests
New
datalad_fuse/tests/test_caching.py:HTTPFileSystem.🤖 Generated with Claude Code
https://claude.ai/code/session_01Qn5WBSiQgoZoL4fytF6nEr
Generated by Claude Code