Use past tense for verbose log

This commit is contained in:
Saba 2021-12-04 11:45:44 -05:00
parent 10e4065e05
commit 9b16cdbb41
2 changed files with 2 additions and 2 deletions

View file

@ -59,7 +59,7 @@ def compute_embeddings(entries, bi_encoder, embeddings_file, regenerate=False, v
corpus_embeddings = bi_encoder.encode([entry[0] for entry in entries], convert_to_tensor=True, show_progress_bar=True) corpus_embeddings = bi_encoder.encode([entry[0] for entry in entries], convert_to_tensor=True, show_progress_bar=True)
torch.save(corpus_embeddings, get_absolute_path(embeddings_file)) torch.save(corpus_embeddings, get_absolute_path(embeddings_file))
if verbose > 0: if verbose > 0:
print(f"Computed embeddings and save them to {embeddings_file}") print(f"Computed embeddings and saved them to {embeddings_file}")
return corpus_embeddings return corpus_embeddings

View file

@ -53,7 +53,7 @@ def compute_embeddings(entries, bi_encoder, embeddings_file, regenerate=False, v
corpus_embeddings = bi_encoder.encode(entries, convert_to_tensor=True, show_progress_bar=True) corpus_embeddings = bi_encoder.encode(entries, convert_to_tensor=True, show_progress_bar=True)
torch.save(corpus_embeddings, get_absolute_path(embeddings_file)) torch.save(corpus_embeddings, get_absolute_path(embeddings_file))
if verbose > 0: if verbose > 0:
print(f"Computed embeddings and save them to {embeddings_file}") print(f"Computed embeddings and saved them to {embeddings_file}")
return corpus_embeddings return corpus_embeddings