Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Testing torch update to version 1.8.1 #767

Merged
Timoeller merged 17 commits intomasterfrom
update_pytorch_1.8.1
May 31, 2021
Merged

Testing torch update to version 1.8.1 #767
Timoeller merged 17 commits intomasterfrom
update_pytorch_1.8.1

Conversation

@Timoeller
Copy link
Copy Markdown
Contributor

fixes #766

@julian-risch
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade to Pytorch 1.8.1

4 participants