Small fix on context manager detection (#37562)

* small fixes

* Update modeling_utils.py

* test

* Update test_modeling_common.py

* Update test_modeling_timm_backbone.py

* more general

* simpler
This commit is contained in:
Cyril Vallez
2025-04-17 15:39:44 +02:00
committed by GitHub
parent c7d3cc67a1
commit 58e5e976e0
6 changed files with 36 additions and 18 deletions

View File

@@ -177,7 +177,7 @@ class TimmBackboneModelTest(ModelTesterMixin, BackboneTesterMixin, PipelineTeste
pass
@unittest.skip(reason="TimmBackbone uses its own `from_pretrained` without device_map support")
def test_cannot_load_with_meta_device_context_manager(self):
def test_can_load_with_meta_device_context_manager(self):
pass
@unittest.skip(reason="model weights aren't tied in TimmBackbone.")