Skip to content

Conversation

@romovpa
Copy link
Contributor

@romovpa romovpa commented Apr 5, 2022

Problem

Integration tests depends on csprng. The latest csprng release was made in Mar 2021 and has strict dependency on pytorch==1.8.0 while 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 csprng from 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 csprng repository. We are going to update and fix the release cycle. After that csprng can be pip installed without wrong dependencies.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 5, 2022
@romovpa romovpa requested a review from ffuuugor April 5, 2022 13:58
@romovpa romovpa linked an issue Apr 5, 2022 that may be closed by this pull request
else
echo "No torchcsprng"
fi
pip install git+https://github.com/pytorch/csprng.git@cd8f2f670355f5a9b345dbe2cb58a52fb2c44d39#egg=torchcsprng
Copy link
Contributor

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
Copy link
Contributor

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}
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

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

L19 is now irrelevant.

@karthikprasad
Copy link
Contributor

What would be the oldest supported pytorch version after this change?

@karthikprasad karthikprasad added this to the 1.1.1 milestone Apr 5, 2022
@ffuuugor ffuuugor modified the milestones: 1.1.1, 1.1.2 Apr 22, 2022
@ffuuugor
Copy link
Contributor

Do we plan to land this or can we close this one and continue in #419 ?

@romovpa
Copy link
Contributor Author

romovpa commented Jul 27, 2022

Closing this until csprng is fixed

@romovpa romovpa closed this Jul 27, 2022
@karthikprasad karthikprasad deleted the romovpa_csprng_fix branch August 10, 2022 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add integration tests with PyTorch 1.10

5 participants