pardata.dataset.Dataset.download
- Dataset.download(*, check=True, verify_checksum=True)
Downloads, extracts, and removes dataset archive. It adds a directory write lock during execution. If
download_urlin the schema is a file path, then this method only extracts.- Parameters
check (bool) – Check to make sure the data files are not already present in
_data_dir(passed in viadata_dirin the constructorDataset) by runningis_downloaded(). If set toTrue, raise an error if they are present and prevent a subsequent download. Set toFalseto remove this safeguard, and subsequent calls todownload()will then overwrite data files if they were previously downloaded to_data_dir.verify_checksum (bool) – If
True, verify sha512sum of the downloaded dataset.
- Raises
RuntimeError –
checkisTrueand the dataset was previously downloaded as indicated byis_downloaded()returningTrue.NotADirectoryError –
Dataset._data_dir(passed in viadata_dirin the constructorDataset) points to an existing file that is not a directory.OSError –
verify_checksumisTrueand the SHA512 checksum of a downloaded dataset doesn’t match the expected checksum.RuntimeError – The archive could not be extracted.
exceptions.DirectoryLockAcquisitionError – Failed to acquire the directory lock.
- Return type