Fix pylint warnings (#39477)
* Fix pylint warnings Signed-off-by: cyy <cyyever@outlook.com> * Fix variable names Signed-off-by: cyy <cyyever@outlook.com> --------- Signed-off-by: cyy <cyyever@outlook.com>
This commit is contained in:
@@ -247,7 +247,7 @@ class GroupViTVisionModelTest(ModelTesterMixin, unittest.TestCase):
|
||||
continue
|
||||
|
||||
self.assertListEqual(
|
||||
list(self_attentions[i].shape[-2:]),
|
||||
list(self_attn.shape[-2:]),
|
||||
[
|
||||
self.model_tester.num_output_groups[i],
|
||||
self.model_tester.num_output_groups[i - 1] if i > 0 else seq_len,
|
||||
|
||||
@@ -1375,9 +1375,7 @@ class TokenizerTesterMixin:
|
||||
self.assertEqual(output_pt["assistant_masks"].shape, output_pt["input_ids"].shape)
|
||||
|
||||
for i, conv in enumerate(conversations):
|
||||
chat_string = tokenizer_r.apply_chat_template(
|
||||
conversations[i], tokenize=False, chat_template=dummy_template
|
||||
)
|
||||
chat_string = tokenizer_r.apply_chat_template(conv, tokenize=False, chat_template=dummy_template)
|
||||
assistant_start = output.char_to_token(i, chat_string.index(assistant_prefix_suffix[i][0][0]))
|
||||
assistant_end = output.char_to_token(
|
||||
i,
|
||||
|
||||
Reference in New Issue
Block a user