check_sha1
¶
Check whether the sha1 hash of the file content matches the expected hash.
Code borrowed from dgl
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
Path to the file. |
required |
sha1_hash
|
str
|
Expected sha1 hash in hexadecimal digits. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
Whether the file content matches the expected hash. |
Source code in mlx_graphs/datasets/utils/download.py
from mlx_graphs.datasets.utils import check_sha1 · mlx_graphs/datasets/utils/download.py