MCPcopy Create free account
hub / github.com/BIT-DataLab/LakeBench / pre_multi_process

Function pre_multi_process

join/LSH/LSH_benchmark_wl.py:148–165  ·  view source on GitHub ↗
(file_list, q, id)

Source from the content-addressed store, hash-verified

146
147
148def pre_multi_process(file_list, q, id):
149 # print("{} start".format(id))
150 sizes = []
151 for i, sets_file in enumerate(file_list):
152 try:
153 df = pd.read_csv(sets_file, dtype='str', lineterminator='\n').dropna()
154 except pd.errors.ParserError as e:
155 print(sets_file)
156 data = df.values.T.tolist()
157 for vals in data:
158 # 需要对value去重
159 sizes.append(len(set(vals)))
160 if id==0:
161 sys.stdout.write("\rId 0 Process Read and pre {}/{} files".format(i+1, len(file_list)))
162 if id==0:
163 sys.stdout.write("\n")
164 q.put((sizes,))
165 # print("{} end,size={}".format(id,len(sizes)))
166
167def minhash_multi_process(file_list, q, param_dic, id):
168 # print("{} start".format(id))

Callers

nothing calls this directly

Calls 1

writeMethod · 0.80

Tested by

no test coverage detected