Traceback (most recent call last):


 "/tmp/portage/dev-python/hypothesis-5.43.4/work/hypothesis-hypothesis-python-5.43.4/hypothesis-python-python3_9/tests/cover/test_unittest.py", line 75, in test_subTest_no_self

fname = testdir.makefile("tests.py", SUBTEST_SUITE)


 "/usr/lib/python3.9/site-packages/_pytest/pytester.py", line 1547, in makefile

return py.path.local(str(self._pytester.makefile(ext, *args, **kwargs)))


 "/usr/lib/python3.9/site-packages/_pytest/pytester.py", line 788, in makefile

return self._makefile(ext, args, kwargs)


 "/usr/lib/python3.9/site-packages/_pytest/pytester.py", line 756, in _makefile

p = self.path.joinpath(basename).with_suffix(ext)


 "/usr/lib/python3.9/pathlib.py", line 889, in with_suffix

raise ValueError("Invalid suffix %r" % (suffix))
ValueError: Invalid suffix 'tests.py'

Traceback (most recent call last):


 "code/run_pretrain.py", line 423, in <module>

main()


 "code/run_pretrain.py", line 320, in main

loss, original_loss = model(input_ids, segment_ids, input_mask, masked_lm_labels, input_ent.half(), ent_mask, next_sentence_label, ent_candidate.half(), ent_labels)


 ".local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in __call__

result = self.forward(*input, **kwargs)


 "ERNIE/code/knowledge_bert/modeling.py", line 839, in forward

next_sentence_loss = loss_fct(seq_relationship_score.view(-1, 2), next_sentence_label.view(-1))


 "local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in __call__

result = self.forward(*input, **kwargs)


 ".local/lib/python3.6/site-packages/torch/nn/modules/loss.py", line 942, in forward

ignore_index=self.ignore_index, reduction=self.reduction)


 "local/lib/python3.6/site-packages/torch/nn/functional.py", line 2056, in cross_entropy

return nll_loss(log_softmax(input, 1), target, weight, None, ignore_index, None, reduction)


 "local/lib/python3.6/site-packages/torch/nn/functional.py", line 1869, in nll_loss

.format(input.size(0), target.size(0)))
ValueError: Expected input batch_size (32) to match target batch_size (24608).
