Utils#
- class sdgx.utils.Singleton[source]#
metaclass for singleton, thread-safe.
- mro()#
Return a type’s method resolution order.
- sdgx.utils.cache(user_function, /)[source]#
Simple lightweight unbounded cache. Sometimes called “memoize”.
- sdgx.utils.download_demo_data(data_dir: str | Path = './dataset') Path[source]#
Download demo data if not exist
- Parameters:
data_dir (str | Path) – data directory
- Returns:
demo data path
- Return type:
pathlib.Path
- sdgx.utils.download_multi_table_demo_data(data_dir: str | Path = './dataset', dataset_name='rossman') dict[str, Path][source]#
Download multi-table demo data “Rossman Store Sales” or “Rossmann Store Sales” if not exist
- Parameters:
data_dir (str | Path) – data directory
- Returns:
dict, the key is table name, value is demo data path
- Return type:
dict[str, pathlib.Path]