Fix torch 1.8.0 segmentation fault (#10546)

* Only run one test

* Patch segfault

* Fix summarization pipeline

* Ready for merge
This commit is contained in:
Lysandre Debut
2021-03-05 18:10:19 +01:00
committed by GitHub
parent 395ffcd757
commit 6b58e15507
3 changed files with 3 additions and 1 deletions

View File

@@ -52,7 +52,7 @@ class SimpleSummarizationPipelineTests(unittest.TestCase):
# Bias output towards L
V, C = model.lm_head.weight.shape
bias = torch.zeros(V, requires_grad=True)
bias = torch.zeros(V)
bias[76] = 10
model.lm_head.bias = torch.nn.Parameter(bias)