Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/models/rag/test_modeling_rag.py
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ class RagDPRT5Test(RagTestMixin, unittest.TestCase):
def config_and_inputs(self):
question_encoder_tester = DPRModelTester(self)
dpr_config_and_inputs = question_encoder_tester.prepare_config_and_inputs()
generator_tester = T5ModelTester(self, vocab_size=1100)
generator_tester = T5ModelTester(self, vocab_size=1101)
Copy link
Contributor Author

@gante gante Sep 18, 2024

Choose a reason for hiding this comment

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

If we go check the test tokenizer, the last expanded token has index 1100 (pad token), so the vocab size has to be 1101 otherwise we will get indexing errors (causing the red CI)

Prior to #32564 the same was happening. I'm assuming the fix in #32564 exposed this issue.

t5_config_and_inputs = generator_tester.prepare_config_and_inputs()

(question_encoder_config, input_ids, _, input_mask, _, _, _) = dpr_config_and_inputs
Expand Down