File size: 228 Bytes
f78d5a7
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
"""File hashing used by the calibrated inference loader."""

import hashlib
from pathlib import Path


def sha256(path):
    with Path(path).open("rb") as stream:
        return hashlib.file_digest(stream, "sha256").hexdigest()