download¶
-
class
dgl.data.utils.
download
(url, path=None, overwrite=True, sha1_hash=None, retries=5, verify_ssl=True, log=True)[source]¶ Download a given URL.
Codes borrowed from mxnet/gluon/utils.py
- Parameters
url (str) – URL to download.
path (str, optional) – Destination path to store downloaded file. By default stores to the current directory with the same name as in url.
overwrite (bool, optional) – Whether to overwrite the destination file if it already exists. By default always overwrites the downloaded file.
sha1_hash (str, optional) – Expected sha1 hash in hexadecimal digits. Will ignore existing file when hash is specified but doesn’t match.
retries (integer, default 5) – The number of times to attempt downloading in case of failure or non 200 return codes.
verify_ssl (bool, default True) – Verify SSL certificates.
log (bool, default True) – Whether to print the progress for download
- Returns
The file path of the downloaded file.
- Return type