Skip to content

Commit 03d5a8a

Browse files
committed
Remove module, fix code
1 parent d9c7367 commit 03d5a8a

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

aquilign/align/bertalign/Bertalign.py

Lines changed: 0 additions & 13 deletions
This file was deleted.

aquilign/align/bertalign/corelib.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -390,16 +390,12 @@ def find_top_k_sents(src_vecs, tgt_vecs, k=3, device='cpu'):
390390
"""
391391
embedding_size = src_vecs.shape[1]
392392
if torch.cuda.is_available() and platform == 'linux' and device != "cpu": # GPU version
393-
print("OK")
394-
exit(0)
395393
res = faiss.StandardGpuResources()
396394
index = faiss.IndexFlatIP(embedding_size)
397395
gpu_index = faiss.index_cpu_to_gpu(res, 0, index)
398396
gpu_index.add(tgt_vecs)
399397
D, I = gpu_index.search(src_vecs, k)
400398
else: # CPU version
401-
print("Not OK")
402-
exit(0)
403399
index = faiss.IndexFlatIP(embedding_size)
404400
index.add(tgt_vecs)
405401
D, I = index.search(src_vecs, k)

0 commit comments

Comments
 (0)