[docs]defget_dataset(options:DictConfig,)->Tuple[Dataset,Dict[str,TargetInfo],Dict[str,TargetInfo]]:""" Gets a dataset given a configuration dictionary. The system and targets in the dataset are read from one or more files, as specified in ``options``. :param options: the configuration options for the dataset. This configuration dictionary must contain keys for both the systems and targets in the dataset. :returns: A tuple containing a ``Dataset`` object and a ``Dict[str, TargetInfo]`` containing additional information (units, physical quantities, ...) on the targets in the dataset """extra_data_info_dictionary={}ifoptions["systems"]["read_from"].endswith(".zip"):# disk datasetdataset=DiskDataset(options["systems"]["read_from"],fields=[*options["targets"],*options.get("extra_data",{})],)target_info_dictionary=dataset.get_target_info(options["targets"])if"extra_data"inoptions:extra_data_info_dictionary=dataset.get_target_info(options["extra_data"])else:systems=read_systems(filename=options["systems"]["read_from"],reader=options["systems"]["reader"],)targets,target_info_dictionary=read_targets(conf=options["targets"])extra_data:Dict[str,List[TensorMap]]={}if"extra_data"inoptions:extra_data,extra_data_info_dictionary=read_extra_data(conf=options["extra_data"])intersecting_keys=targets.keys()&extra_data.keys()ifintersecting_keys:raiseValueError(f"Extra data keys {intersecting_keys} overlap with target keys. ""Please use unique keys for targets and extra data.")dataset=Dataset.from_dict({"system":systems,**targets,**extra_data})returndataset,target_info_dictionary,extra_data_info_dictionary