deepset-ai / FARM

:house_with_garden: Fast & easy transfer learning for NLP. Harvesting language models for the industry. Focus on Question Answering.
https://farm.deepset.ai
Apache License 2.0
1.74k stars 247 forks source link

Testing torch update to version 1.8.1 #767

Closed Timoeller closed 3 years ago

Timoeller commented 3 years ago

fixes #766

julian-risch commented 3 years ago

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:

  1. The probability value of a prediction changed slightly in one of the tests: https://github.com/deepset-ai/FARM/blob/816b4e3e65c142f8a31a63833058b75fe0419ed4/test/test_ner_amp.py#L97 E assert 0.123253375 > 0.124

I suggest the following change:

lvh commented 3 years ago

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