File size: 279 Bytes
998bb30
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
from ..runtime.factory import Registry

DATASET_REGISTRY = Registry('DATASET')


def build_dataset(_type: str, *args, **kwargs) -> object:
    return DATASET_REGISTRY.get(_type)(*args, **kwargs)


def list_datasets():
    return list(DATASET_REGISTRY._obj_map.keys())