Skip to content

Commit

Permalink
check symmetric instead of full match (ModelCloud#868)
Browse files Browse the repository at this point in the history
* call patch for TestTransformersIntegration

* fix ruff

* remove \

* check symmetric instead of full match
  • Loading branch information
CSY-ModelCloud authored Dec 16, 2024
1 parent 6c56d17 commit a5820fd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_transformers_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ def _test_quantize(self, device_map):
print('generate_str',generate_str)
print('expect_str',expect_str)

self.assertEqual(generate_str[:40], expect_str[:40])
diff_count = len(set(generate_str.split()).symmetric_difference(expect_str.split()))

self.assertLessEqual(diff_count, 2)

def test_load_quantized_model_gptq_v1_ipex(self):
self._test_load_quantized_model_gptq_v1(device_map="cpu")
Expand Down

0 comments on commit a5820fd

Please sign in to comment.