pardata.dataset.Dataset.load
- Dataset.load(subdatasets=None, format_loader_map=None, check=True)
Load data files to RAM. It adds a directory read lock during execution.
- Parameters
subdatasets (Optional[Iterable[str]]) – The subdatasets to load.
Nonemeans all subdatasets.format_loader_map (Optional[pardata.loaders._format_loader_map.FormatLoaderMap]) – The
loaders.FormatLoaderMapobject that determines which loader to use.check (bool) – Check to make sure the data files are currently present in
_data_dir(passed in viadata_dirin the constructorDataset) before loading them by runningis_downloaded(). If set toTrue, raise an error if they are missing and prevent attempting to load them. Set toFalseto remove this safeguard.
- Raises
RuntimeError – The dataset was not previously downloaded as indicated by
is_downloaded()returningFalse.FileNotFoundError – The dataset files for a particular subdataset are not found on the disk. Either this is because
download()was never called, or the dataset was only partially downloaded.exceptions.DirectoryLockAcquisitionError – Failed to acquire the directory lock.
- Returns
Loaded data objects. Same as
data.- Return type
Dict[str, Any]