xlang-ai / instructor-embedding

[ACL 2023] One Embedder, Any Task: Instruction-Finetuned Text Embeddings
Apache License 2.0
1.78k stars 131 forks source link

Bugfix AbsTaskRetrieval for DREPS evaluation #80

Closed ashokrajab closed 10 months ago

ashokrajab commented 10 months ago

Issues fixed:

  1. When debugging the evalution_model.py in multi_gpu case, there occurs a debugger port collision between parent and child processes. In order to avoid this: nested the evaluation_model.py within name == 'main'.
  2. The expected behaviour of sentence_transformer_encode_multi_process_worker() function is to encode the corpus, evaluate the score against all the queries and store the metric. This was not properly handled by this function. Hence made use of the default SentenceTransformer._encode_multi_process_worker().
  3. Appended instruction in sentences list in encode_corpus_parallel(). This change is made with reference taken from encode_corpus() function.
  4. USE_BEIR_DEVELOPMENT is removed from evaluation/MTEB/mteb/abstasks/BeIRTask.py. This boolean just skips cqadupstack dataset download. I do not find any valid reason to do so. Hence removed.
  5. Added explicit requirement pyarrow==8.0.0. Pip auto dependency resolver installs the latest version of pyarrow and that does not play well with the evaluate package.
  6. Added necessary changes in train.py in order to feed in validation dataset.