Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pytorch dependency for Flair too restrictive #56

Open
indylec opened this issue Dec 21, 2022 · 3 comments
Open

Pytorch dependency for Flair too restrictive #56

indylec opened this issue Dec 21, 2022 · 3 comments

Comments

@indylec
Copy link

indylec commented Dec 21, 2022

Hi,

When trying to pip install polyfuzz[flair], pip is not able to resolve the pytorch dependency:

INFO: pip is looking at multiple versions of polyfuzz[flair] to determine which version is compatible with other requirements. This could take a while.
Collecting polyfuzz[flair]
  Downloading polyfuzz-0.2.0-py2.py3-none-any.whl (25 kB)
  Downloading polyfuzz-0.0.1-py2.py3-none-any.whl (21 kB)
WARNING: polyfuzz 0.0.1 does not provide the extra 'flair'
Collecting sparse-dot-topn>=0.2.9
  Downloading sparse_dot_topn-0.3.1.tar.gz (17 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
ERROR: Cannot install polyfuzz[flair]==0.2.2, polyfuzz[flair]==0.3.0, polyfuzz[flair]==0.3.1, polyfuzz[flair]==0.3.2, polyfuzz[flair]==0.3.3, polyfuzz[flair]==0.3.4 and polyfuzz[flair]==0.4.0 because these package versions have conflicting dependencies.

The conflict is caused by:
    polyfuzz[flair] 0.4.0 depends on torch<1.7.1 and >=1.4.0; extra == "flair"
    polyfuzz[flair] 0.3.4 depends on torch<1.7.1 and >=1.4.0; extra == "flair"
    polyfuzz[flair] 0.3.3 depends on torch<1.7.1 and >=1.4.0; extra == "flair"
    polyfuzz[flair] 0.3.2 depends on torch>=1.2.0; extra == "flair"
    polyfuzz[flair] 0.3.1 depends on torch>=1.2.0; extra == "flair"
    polyfuzz[flair] 0.3.0 depends on torch>=1.2.0; extra == "flair"
    polyfuzz[flair] 0.2.2 depends on torch>=1.2.0; extra == "flair"

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

Neither pip nor conda offers pytorch version less than 1.9, current release is 1.13 - is the strict dependency something that can be updated without breaking anything?

Or have I just missed something obvious here?

Standard polyfuzz 0.4 install works just fine, otherwise - but I'd like to try out flair!

Thanks, Indy

@MaartenGr
Copy link
Owner

Apologies for the late reply! It is a while ago but that restriction was necessary for Flair to work in conjunction with sentence-transformers. Having said that, I just checked out the pinned requirements in both repos and it seems that their newest versions should work together nicely. Let me do some testing and get back to you but I think it should be okay to relax that dependency!

@zeldrinn
Copy link

zeldrinn commented Jul 7, 2023

hey @MaartenGr were you able to make any progress on this?

@MaartenGr
Copy link
Owner

@zeldrinn I have not had the time to test it out but I believe you can do the following:

pip install polyfuzz
pip install --upgrade flair

I believe that should work. If not, please let me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants