

import os
import unittest

import pytest
from parameterized import parameterized

from transformers.testing_utils import require_torch, require_torch_gpu, slow, torch_device


# skipping in unittest tests

_UpperCAmelCase    	=			[(1,)]


def 			__UpperCamelCase    ()     ->  Optional[Any]:
      A    =				bool(os.getenv('RUN_SLOW',    0     )     )
      if run_slow:
            assert True
      else:
            assert False, "should have been skipped"


def 			__UpperCamelCase    ()     ->  str:
      A    =				bool(os.getenv('RUN_SLOW',    0     )     )
      if run_slow and torch_device == "cuda":
            assert True
      else:
            assert False, "should have been skipped"



@require_torch
class        _UpperCAmelCase (   unittest.TestCase			):
  '''simple docstring'''







  @slow
  @require_torch_gpu
  def 	UpperCamelCase       ( self	: Dict ):
        check_slow_torch_cuda()







  @require_torch_gpu
  @slow
  def 	UpperCamelCase       ( self	: List[Any] ):
        check_slow_torch_cuda()







  @parameterized.expand(UpperCamelCase__ )
  @slow
  def 	UpperCamelCase       ( self	: Optional[int]		,						UpperCamelCase__	: Dict=None ):
        check_slow()


@slow
@require_torch_gpu
def 			__UpperCamelCase    ()     ->  Union[str, Any]:
      check_slow_torch_cuda()


@require_torch_gpu
@slow
def 			__UpperCamelCase    ()     ->  Optional[Any]:
      check_slow_torch_cuda()


@slow
@pytest.mark.parametrize('param',    [1]     )
def 			__UpperCamelCase    (lowerCAmelCase					:  Optional[Any]     )     ->  str:
      check_slow()







@pytest.mark.parametrize('param',    [1]     )
@slow
def 			__UpperCamelCase    (lowerCAmelCase					:  int     )     ->  Union[str, Any]:
      check_slow()






from ..utils import requires_backends


_UpperCAmelCase    	=			None



class        _UpperCAmelCase :
  '''simple docstring'''







  def __init__( self	: List[str]		,						*UpperCamelCase__	: str		,						**UpperCamelCase__	: Any ):
        requires_backends(self		,						['detectron2'] )







  @classmethod
  def 	UpperCamelCase       ( cls	: Dict		,						*UpperCamelCase__	: Tuple		,						**UpperCamelCase__	: List[Any] ):
        requires_backends(cls		,						['detectron2'] )



