Skip to content

Commit

Permalink
Skip test_multi_gpu_data_parallel_forward for UperNetModelTest (h…
Browse files Browse the repository at this point in the history
…uggingface#21216)

fix

Co-authored-by: ydshieh <[email protected]>
  • Loading branch information
ydshieh and ydshieh authored Jan 24, 2023
1 parent 7119bb0 commit bde7378
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/models/upernet/test_modeling_upernet.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

from huggingface_hub import hf_hub_download
from transformers import ConvNextConfig, UperNetConfig
from transformers.testing_utils import require_torch, require_vision, slow, torch_device
from transformers.testing_utils import require_torch, require_torch_multi_gpu, require_vision, slow, torch_device
from transformers.utils import is_torch_available, is_vision_available

from ...test_configuration_common import ConfigTester
Expand Down Expand Up @@ -199,6 +199,11 @@ def test_save_load_fast_init_from_base(self):
def test_save_load_fast_init_to_base(self):
pass

@require_torch_multi_gpu
@unittest.skip(reason="UperNet has some layers using `add_module` which doesn't work well with `nn.DataParallel`")
def test_multi_gpu_data_parallel_forward(self):
pass

def test_hidden_states_output(self):
def check_hidden_states_output(inputs_dict, config, model_class):
model = model_class(config)
Expand Down

0 comments on commit bde7378

Please sign in to comment.