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

Testing torch update to version 1.8.1 #767

Merged
merged 17 commits into from
May 31, 2021
Merged

Conversation

Timoeller
Copy link
Contributor

fixes #766

@julian-risch
Copy link
Member

I see three failing tests because of two problems:

  1. test_dpr.py calls initialize_device_settings(use_cuda=False)
    therefore, torch.distributed.init_process_group(backend="nccl") is not executed and thus
    rank = torch.distributed.get_rank() results in a RuntimeError

I suggest the following change:

  • except (AssertionError, RuntimeError):
  1. The probability value of a prediction changed slightly in one of the tests:
    assert result[0]["predictions"][0][0]["probability"] > 0.124

    E assert 0.123253375 > 0.124

I suggest the following change:

  • assert np.isclose(result[0]["predictions"][0][0]["probability"], 0.124, rtol=0.05)

@julian-risch julian-risch mentioned this pull request May 21, 2021
@julian-risch julian-risch self-requested a review May 31, 2021 14:02
Copy link
Member

@julian-risch julian-risch left a comment

Choose a reason for hiding this comment

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

looks good to me 👍

@Timoeller Timoeller merged commit c9235f2 into master May 31, 2021
@lvh
Copy link

lvh commented May 31, 2021

Hooray! Thanks for this, no longer needing to keep an old version of torch around is really convenient :)

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

Successfully merging this pull request may close these issues.

Upgrade to Pytorch 1.8.1
4 participants