-
Notifications
You must be signed in to change notification settings - Fork 388
Enable integration tests with the latest PyTorch by installing csprng from the source #407
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
Conversation
… the broken release)
scripts/pytorch_install.sh
Outdated
| else | ||
| echo "No torchcsprng" | ||
| fi | ||
| pip install git+https://github.com/pytorch/csprng.git@cd8f2f670355f5a9b345dbe2cb58a52fb2c44d39#egg=torchcsprng |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a comment explaining why you chose this specific commit?
| if [[ $PYTORCH_NIGHTLY == true ]]; then | ||
| if [[ $CUDA == true ]]; then | ||
| pip install --upgrade --pre torch torchvision torchcsprng -f https://download.pytorch.org/whl/nightly/cu101/torch_nightly.html | ||
| pip install --upgrade --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cu101/torch_nightly.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be cu102 since you are changing Cuda version to 10.2?
| # torchcsprng | ||
| if [ "$TORCH_VERSION" = "1.8.0" ] | ||
| then | ||
| pip install torchcsprng==${TORCHCSPRNG_VERSION} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose this means L22 is no longer required?
| pip install torch==$TORCH_VERSION+cpu torchvision==$TORCHVISION_VERSION+cpu -f https://download.pytorch.org/whl/torch_stable.html | ||
|
|
||
| If ($TORCH_VERSION -eq "1.8.0") { | ||
| pip install torchcsprng==$TORCHCSPRNG_VERSION+cpu -f https://download.pytorch.org/whl/torch_stable.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
L19 is now irrelevant.
|
What would be the oldest supported pytorch version after this change? |
|
Do we plan to land this or can we close this one and continue in #419 ? |
|
Closing this until csprng is fixed |
Problem
Integration tests depends on
csprng. The latest csprng release was made in Mar 2021 and has strict dependency onpytorch==1.8.0while the code actually works fine with the newer versions of pytorch.The release cycle is currently broken and there is no easy way to make a new release with the fix.
Temporary solution
Instead of installing
csprngfrom PyPI (having outdated broken release), for the purpose of integration tests we install it from the github source. Recommend doing the same in FAQ.This removes artificially created dependency on the earlier pytorch version and unblocks new features.
Further work
As agreed with the former csprng developer, the Opacus team is the new owner of
csprngrepository. We are going to update and fix the release cycle. After that csprng can be pip installed without wrong dependencies.