We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e3032c6 commit 140cb03Copy full SHA for 140cb03
keras_remote/data/data.py
@@ -23,6 +23,8 @@ 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
+ # 64 KB: standard buffer size used by shutil.copyfileobj and
27
+ # hashlib.file_digest, aligns with NVMe page sizes.
28
with open(fpath, "rb") as f:
29
for chunk in iter(partial(f.read, 65536), b""):
30
h.update(chunk)
0 commit comments