MCPcopy Create free account
hub / github.com/Tencent/embedx / _load_data_as_dict

Function _load_data_as_dict

demo/evaluate.py:81–88  ·  view source on GitHub ↗
(path, dtype=float)

Source from the content-addressed store, hash-verified

79
80
81def _load_data_as_dict(path, dtype=float):
82 data_dict = collections.defaultdict(list)
83 for file_name in _get_file_list(path):
84 with open(file_name, "r") as fin:
85 for line in fin:
86 vec = line.strip().split(' ')
87 data_dict[vec[0]] = [dtype(x) for x in vec[1:]]
88 return data_dict
89
90
91def _parse_args():

Callers 1

mainFunction · 0.85

Calls 1

_get_file_listFunction · 0.85

Tested by

no test coverage detected