You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Address the PR review: file:// URLs, cache identity, cache geometry
Three real defects, all confirmed by repro before fixing.
file:// was excluded from the fsspec branch so it could keep mmap and the
directory formats, but nothing downstream stripped the scheme, so it reached
os.path.exists() and the C layer as a literal filename and failed. The
docstring promising otherwise was simply wrong. Normalized to a native path
in open(), NDArray.save(), Storage, and the two constructor paths that
bypass Storage.
The directory cache manifest compared name, size and mtime, which is the
same mistake already fixed for the lazy chunk cache and missed here: on a
backend with no mtime -- memory://, and the tests only use memory:// -- a
same-size rewrite left the manifest unchanged and served stale files. It
now hashes each entry with tokenize(), which is what fs.ukey() uses.
Reusing a proxy cache checked shape and dtype only. Chunk numbers are the
currency between cache and source, so a same-shaped source chunked
differently fetched the wrong chunks and returned wrong data with no error
at all; chunks and blocks are compared now, and non-ND sources get the same
check on nbytes, chunksize and typesize instead of none.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
0 commit comments