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

Function pre_multi_process

join/LSH/LSH_benchmark_ol.py:143–160  ·  view source on GitHub ↗
(file_list, q, id)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

writeMethod · 0.80

Tested by

no test coverage detected