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

After upgrading P.Lightening to 1.2.3, remains other incompatibilities with torch 1.8.0. A workaround until is sorted out all, is to stick with torch 1.7.1. #1869

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ numpy>=1.18.2
onnx>=1.7.0
pytorch-lightning>=1.1.0,<=1.1.5
python-dateutil
torch
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can't pin torch to the exact version because it will force torch re-install if the user has slightly different version (e.g. 1.7.0) or inside NVIDIA's container (20.11-py3) which has version like (1.8.0a0+17f8c32 --- this is before upstream's 1.8)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@okuchaiev thanks for the suggestion.
I tried to let torch as it was and just changed the range for pytorch-lightning>=1.2.0,<=1.2.2.
At this moment 1.2.2 is the latest and 1.2.0 seems to have some PyTorch 1.8 compatibility fixes.

I recreate the env from the scratch with ./reinstall.sh with the above PLT range changes, but the issue is still there. Cannot choose newer version from PLT.
Then I found somewhere a workaround like

torchtext>=0.5, <0.7 # TODO: temporary fix fix for compatibility

I downgraded torchtext to 0.7, then complained about _torchtext.so undefined symbol. Probably it will not be possible to downgrade just torchtest.

I have no other idea, then just for myself I come back to torch 1.7.1 and if somebody will install these days, may run in the same issue and do like myself.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now, pytorch-lightening 1.2.3 came out, which has the fix. I did a test. This PLT version incompatibility is fixed, but came out another. You can read #1868

torch==1.7.1
wget
wrapt
ruamel.yaml
Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements_asr.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ packaging
ruamel.yaml
soundfile
sox
torch-stft
torch-stft==0.1.4
unidecode
kaldi-python-io
kaldiio
Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements_cv.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pillow
torchvision
torchvision==0.8.2
2 changes: 1 addition & 1 deletion requirements/requirements_nlp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ boto3
h5py
matplotlib>=3.3.2
sentencepiece
torchtext
torchtext==0.8.1
unidecode
youtokentome
numpy
Expand Down