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

Function pre_multi_process

join/LSH/LSH_benchmark_ws.py:142–159  ·  view source on GitHub ↗
(file_list, q, id)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

writeMethod · 0.80

Tested by

no test coverage detected