We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e3032c6 commit 97b3eb5Copy full SHA for 97b3eb5
keras_remote/data/data.py
@@ -23,8 +23,9 @@ def _hash_single_file(fpath: str, relpath: str) -> bytes:
23
h = hashlib.sha256()
24
h.update(relpath.encode("utf-8"))
25
h.update(b"\0")
26
+ # 256 KB: matches hashlib.file_digest's default buffer size.
27
with open(fpath, "rb") as f:
- for chunk in iter(partial(f.read, 65536), b""):
28
+ for chunk in iter(partial(f.read, 2**18), b""):
29
h.update(chunk)
30
return h.digest()
31
0 commit comments