


from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


A_    :					Optional[int]             ={"""configuration_vit_hybrid""": ["""VIT_HYBRID_PRETRAINED_CONFIG_ARCHIVE_MAP""", """ViTHybridConfig"""]}

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	A_    :					Any             =[
	    """VIT_HYBRID_PRETRAINED_MODEL_ARCHIVE_LIST""",
	    """ViTHybridForImageClassification""",
	    """ViTHybridModel""",
	    """ViTHybridPreTrainedModel""",
	]

try:
	if not is_vision_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	A_    :					int             =["""ViTHybridImageProcessor"""]


if TYPE_CHECKING:
	from .configuration_vit_hybrid import VIT_HYBRID_PRETRAINED_CONFIG_ARCHIVE_MAP, ViTHybridConfig

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_vit_hybrid import (
		    VIT_HYBRID_PRETRAINED_MODEL_ARCHIVE_LIST,
		    ViTHybridForImageClassification,
		    ViTHybridModel,
		    ViTHybridPreTrainedModel,
		)

	try:
		if not is_vision_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .image_processing_vit_hybrid import ViTHybridImageProcessor


else:
	import sys

	A_    :					Optional[int]             =_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)



import abc
import copy
import dataclasses
from dataclasses import dataclass
from typing import ClassVar, Dict, Type, TypeVar

from ..features import Features


A_    :					Tuple             =TypeVar("""T""", bound="""TaskTemplate""")





@dataclass(frozen=UpperCamelCase__)
class        lowercase_				( abc.ABC):






							"""simple docstring"""







							snake_case_        =		42
							snake_case_        =		42
							snake_case_        =		42


							def 						lowercase__     (   self			,    _UpperCAmelCase		):







													"""simple docstring"""


													return copy.deepcopy(self		)


							@property
							def 						lowercase__     (   self		):







													"""simple docstring"""


													return Features(**self.input_schema			,    **self.label_schema		)


							@property
							@abc.abstractmethod
							def 						lowercase__     (   self		):







													"""simple docstring"""


													raise NotImplementedError






							@classmethod
							def 						lowercase__     (   cls			,    _UpperCAmelCase		):







													"""simple docstring"""


													a_					=		{f.name for f in dataclasses.fields(cls		)}
													return cls(**{k: v for k, v in template_dict.items() if k in field_names}		)