Detect and use device context manager or global device in from_pretrained (#37216)
* Update modeling_utils.py * improve * Update modeling_utils.py * Update test_modeling_common.py * Update test_modeling_timm_backbone.py * Update test_modeling_common.py * Update test_modeling_common.py * Update test_modeling_common.py * Update test_modeling_common.py * CIs
This commit is contained in:
@@ -168,6 +168,18 @@ class TimmBackboneModelTest(ModelTesterMixin, BackboneTesterMixin, PipelineTeste
|
||||
def test_save_load_low_cpu_mem_usage_no_safetensors(self):
|
||||
pass
|
||||
|
||||
@unittest.skip(reason="TimmBackbone uses its own `from_pretrained` without device_map support")
|
||||
def test_can_load_with_device_context_manager(self):
|
||||
pass
|
||||
|
||||
@unittest.skip(reason="TimmBackbone uses its own `from_pretrained` without device_map support")
|
||||
def test_can_load_with_global_device_set(self):
|
||||
pass
|
||||
|
||||
@unittest.skip(reason="TimmBackbone uses its own `from_pretrained` without device_map support")
|
||||
def test_cannot_load_with_meta_device_context_manager(self):
|
||||
pass
|
||||
|
||||
@unittest.skip(reason="model weights aren't tied in TimmBackbone.")
|
||||
def test_tie_model_weights(self):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user