MCPcopy Create free account
hub / github.com/InternScience/SciReason / load_datasets

Function load_datasets

tests/dataset/test_ms_datasets.py:94–112  ·  view source on GitHub ↗
(source, conf)

Source from the content-addressed store, hash-verified

92
93
94def load_datasets(source, conf):
95 environ['DATASET_SOURCE'] = source
96 if 'lang' in conf:
97 dataset = conf['type'].load(path=conf['path'], lang=conf['lang'])
98 return dataset
99 if 'setting_name' in conf:
100 dataset = conf['type'].load(path=conf['path'],
101 name=conf['name'],
102 setting_name=conf['setting_name'])
103 return dataset
104 if 'name' in conf:
105 dataset = conf['type'].load(path=conf['path'], name=conf['name'])
106 return dataset
107 try:
108 dataset = conf['type'].load(path=conf['path'])
109 except Exception as e:
110 print(e)
111 dataset = conf['type'].load(**conf)
112 return dataset
113
114
115def clean_string(value):

Callers 1

compare_datasetsMethod · 0.70

Calls 1

loadMethod · 0.45

Tested by

no test coverage detected