Fix typos in strings and comments (#37799)
This commit is contained in:
@@ -56,7 +56,7 @@ class LlavaConfigTest(unittest.TestCase):
|
||||
|
||||
def test_arbitrary_reload(self):
|
||||
"""
|
||||
Simple test for reloading arbirarily composed subconfigs
|
||||
Simple test for reloading arbitrarily composed subconfigs
|
||||
"""
|
||||
default_values = LlavaConfig().to_diff_dict()
|
||||
default_values["vision_config"]["model_type"] = "pixtral"
|
||||
|
||||
@@ -553,8 +553,8 @@ class LlavaForConditionalGenerationIntegrationTest(unittest.TestCase):
|
||||
# image = Image.open(requests.get(url, stream=True).raw)
|
||||
inputs = processor(text=PROMPT, images=IMG_URLS, return_tensors="pt").to(model.device)
|
||||
generate_ids = model.generate(**inputs, max_new_tokens=500)
|
||||
ouptut = processor.batch_decode(generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]
|
||||
print(ouptut)
|
||||
output = processor.batch_decode(generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]
|
||||
print(output)
|
||||
|
||||
# fmt: off
|
||||
EXPECTED_GENERATION = """
|
||||
@@ -573,7 +573,7 @@ These descriptions provide a detailed overview of the content and atmosphere of
|
||||
"""
|
||||
# fmt: on
|
||||
# check that both inputs are handled correctly and generate the same output
|
||||
self.assertEqual(ouptut, EXPECTED_GENERATION)
|
||||
self.assertEqual(output, EXPECTED_GENERATION)
|
||||
|
||||
@slow
|
||||
@require_bitsandbytes
|
||||
|
||||
Reference in New Issue
Block a user