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

requiring torch >= 1.7.1 #342

Closed
danpovey opened this issue Jul 22, 2021 · 7 comments
Closed

requiring torch >= 1.7.1 #342

danpovey opened this issue Jul 22, 2021 · 7 comments

Comments

@danpovey
Copy link
Collaborator

why does lhotse require torch >= 1.7.1?
just curious. I was using 1.7.0.

@pzelasko
Copy link
Collaborator

The "1.7" part is because that's the first version where torchaudio has the sox_effects module. I am not sure about the .1 patch -- but I think it was arbitrary and not related to any specific issue that they fixed. I can probably lower the required version.

@mthrok
Copy link

mthrok commented Jul 22, 2021

@pzelasko PyTorch 1.7 (==torchaudio 0.7) had issue with OpenMP and sox_effects, where sox_effects becomes super slow. We disabled the OpenMP for sox_effects in PyTorch 1.7.1 (==torchaudio 0.7.2)

@pzelasko
Copy link
Collaborator

Ah, of course, I remember now 🤦🏼. Thanks!

@mthrok
Copy link

mthrok commented Jul 22, 2021

The issue was reported here pytorch/audio#1021

@danpovey
Copy link
Collaborator Author

BTW, I had some difficulty installing the latest version of Lhotse.
The torch wheel files are quite slow to download here so I wanted to us a version of torch (1.7.1) that I believed would work, that Lhotse accepted, and we had the wheel file for locally.
But then Lhotse noticed that the torchaudio version was not sufficient, either below Lhotse's requirement or incompatible with this torch, so it decided to download a more recent version of torchaudio. It chose the most recent version. For this it tried pulling in a more recent version of torch (1.9.x). I wanted to find a torchaudio version that was compatible with the 1.7.1 of torch, but it turns out that that is a very nontrivial thing to do, since pip currently offers no mechanism to find out what the requirements of a given version of a package are without actually installing it (an unforgivable omission). I found a package called johnnydep which appears to be able to do that (at the expense of downloading the wheel files concerned).

I'm guessing there are no easy fixes for these problems, because they are weaknesses in pip itself, and trying to fix upstream problems is often not a good idea.

@pzelasko
Copy link
Collaborator

pzelasko commented Jul 23, 2021

Sorry to hear that. FWIW anaconda/miniconda would have probably downloaded the right torchaudio, they are more strict about the version compatibility. I think the right torchaudio is 0.7.2 but not sure how I came to know that.

EDIT: Moto mentioned it a few comments above and my subconsious remembered ;)

@pzelasko
Copy link
Collaborator

pzelasko commented Aug 6, 2021

Resolved by #348

@pzelasko pzelasko closed this as completed Aug 6, 2021
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