(self)
| 107 | self.assertTrue(tokenizer is not None) |
| 108 | |
| 109 | def test_transformer_patch(self): |
| 110 | with patch_context(): |
| 111 | from transformers import AutoTokenizer, AutoModelForCausalLM |
| 112 | tokenizer = AutoTokenizer.from_pretrained('Qwen/Qwen2.5-0.5B') |
| 113 | self.assertIsNotNone(tokenizer) |
| 114 | model = AutoModelForCausalLM.from_pretrained('Qwen/Qwen2.5-0.5B') |
| 115 | self.assertIsNotNone(model) |
| 116 | |
| 117 | def test_patch_model(self): |
| 118 | from modelscope.utils.hf_util.patcher import patch_context |
nothing calls this directly
no test coverage detected