"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "e03129ad447ad7670fcc6206e5eb27a5435d4d86"
Unverified Commit 96f1f74a authored by Nicolas Patry's avatar Nicolas Patry Committed by GitHub
Browse files

Fixing tests. It seems master changed something in the warnings. (#9483)

Trying to keep warning tests for now. Should be discarded if it becomes
too hard to maintain.
parent 1c19b423
...@@ -134,10 +134,10 @@ class SimpleConversationPipelineTests(unittest.TestCase): ...@@ -134,10 +134,10 @@ class SimpleConversationPipelineTests(unittest.TestCase):
generated_responses=["b"], generated_responses=["b"],
) )
with self.assertLogs("transformers", level="WARNING") as log: with self.assertLogs("transformers", level="WARNING") as log:
_ = conversation_agent(conversation, max_length=60) _ = conversation_agent(conversation, max_length=64)
self.assertEqual(len(log.output), 3) self.assertEqual(len(log.output), 3)
self.assertIn("Cutting history off because it's too long (63 > 28) for underlying model", log.output[0]) self.assertIn("Cutting history off because it's too long (63 > 32) for underlying model", log.output[0])
self.assertIn("63 is bigger than 0.9 * max_length: 60", log.output[1]) self.assertIn("63 is bigger than 0.9 * max_length: 64", log.output[1])
self.assertIn("Setting `pad_token_id`", log.output[2]) self.assertIn("Setting `pad_token_id`", log.output[2])
self.assertEqual(conversation._index, 1) self.assertEqual(conversation._index, 1)
self.assertEqual( self.assertEqual(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment