skarf.covariance.load_spi_config_map#
- skarf.covariance.load_spi_config_map(subset: Literal['all', 'fast', 'sonnet', 'fabfour'] = 'all', cache: bool = True, cache_dir: Path | None = None) tuple[dict[str, dict[str, Any]], list[dict[str, Any]]]#
Extract a mapping of SPI identifiers to configuration dicts.
- Parameters:
- subset{‘all’, ‘fast’, ‘sonnet’, ‘fabfour’}, default=’full’
PySPI config yaml subset.
- cachebool, default=True
Load/store config map to cache file.
- cache_dirPath, default=None
Optional cache dir to override global package cache dir.
- Returns:
- spi_config_mapdict of str -> dict of str -> value
Dictionary mapping SPI identifier names to SPI config dictionaries. Each config dictionary should contain the following keys:
‘module_name’ : Name of the module where the SPI is defined, relative to
pyspi. E.g.'.statistics.basic'.‘fcn’ : PySPI function name (i.e. class name), e.g.
'Covariance'.‘params’ : Parameters passed through to the PySPI SPI
fcn, e.g.{'estimator': 'EmpiricalCovariance', 'squared': True}.
- unavailable_spi_configslist of dict of str -> value
List of SPI config dictionaries for unavailable SPIs. SPIs may be unavailable for example because of a missing optional python or system dependency.