UKPLab / gpl

Powerful unsupervised domain adaptation method for dense retrieval. Requires only unlabeled corpus and yields massive improvement: "GPL: Generative Pseudo Labeling for Unsupervised Domain Adaptation of Dense Retrieval" https://arxiv.org/abs/2112.07577
Apache License 2.0
315 stars 39 forks source link

Version conflict due to `easy-elasticsearch` and latest `beir` #13

Open HHousen opened 2 years ago

HHousen commented 2 years ago

There exists a version conflict in the dependencies of GPL. GPL requires easy-elasticsearch>=0.0.7 (0.0.7 is the latest version of easy-elasticsearch). easy-elasticsearch requires elasticsearch==7.12.1 but beir, which GPL depends on at any version, requires elasticsearch==7.9.1. Thus, a dependency solver (like poetry) will install beir==0.0.4 when installing gpl since beir==0.0.4 does not depend on elasticsearch at all. However, GPL is not compatible with beir==0.0.4. So, the latest versions of GPL and BEIR are not compatible.

However, running pip install gpl will work because easy-elasticsearch==0.0.7 presumably works with elasticsearch==7.9.1. Installing with pip will warn that easy-elasticsearch 0.0.7 requires elasticsearch==7.12.1, but you have elasticsearch 7.9.1 which is incompatible, but training still works correctly.

The easiest solution is to change easy-elasticsearch or beir's dependencies to allow elasticsearch between 7.9.1 and 7.12.1. I don't think anything can be done in gpl's setup.py file because it has two dependencies that each are pinning a different version of elasticsearch. A minimum version of beir could be set in gpl's setup.py to prevent an incompatible version from being installed via a package manager with a dependency solver.