






"""simple docstring"""


from abc import ABC, abstractmethod
from typing import Optional, Union

from .. import Dataset, DatasetDict, Features, IterableDataset, IterableDatasetDict, NamedSplit
from ..utils.typing import NestedDataStructureLike, PathLike




class 						__UpperCamelCase     (     UpperCamelCase						):
					def __init__(							self							:	Tuple     , UpperCAmelCase							:	Optional[NestedDataStructureLike[PathLike]] = None     , UpperCAmelCase							:	Optional[NamedSplit] = None     , UpperCAmelCase							:	Optional[Features] = None     , UpperCAmelCase							:	str = None     , UpperCAmelCase							:	bool = False     , UpperCAmelCase							:	bool = False     , UpperCAmelCase							:	Optional[int] = None     , **UpperCAmelCase							:	List[Any]     , )	->       List[Any]:
											lowerCAmelCase   :List[Any]						=			path_or_paths
											lowerCAmelCase   :Union[str, Any]						=			split if split or isinstance(UpperCAmelCase     , UpperCAmelCase   ) else 'train'
											lowerCAmelCase   :Any						=			features
											lowerCAmelCase   :Dict						=			cache_dir
											lowerCAmelCase   :int						=			keep_in_memory
											lowerCAmelCase   :Optional[int]						=			streaming
											lowerCAmelCase   :Tuple						=			num_proc
											lowerCAmelCase   :Tuple						=			kwargs
					@abstractmethod
					def        UpperCAmelCase__ (							self							:	Optional[Any]   )	->       Union[Dataset, DatasetDict, IterableDataset, IterableDatasetDict]:
											pass




class 						__UpperCamelCase     (     UpperCamelCase						):
					def __init__(							self							:	Dict     , UpperCAmelCase							:	Optional[Features] = None     , UpperCAmelCase							:	str = None     , UpperCAmelCase							:	bool = False     , UpperCAmelCase							:	bool = False     , UpperCAmelCase							:	Optional[int] = None     , **UpperCAmelCase							:	List[str]     , )	->       Union[str, Any]:
											lowerCAmelCase   :int						=			features
											lowerCAmelCase   :Tuple						=			cache_dir
											lowerCAmelCase   :Tuple						=			keep_in_memory
											lowerCAmelCase   :Optional[Any]						=			streaming
											lowerCAmelCase   :Optional[int]						=			num_proc
											lowerCAmelCase   :Tuple						=			kwargs
					@abstractmethod
					def        UpperCAmelCase__ (							self							:	Optional[Any]   )	->       Union[Dataset, IterableDataset]:
											pass







"""simple docstring"""


from typing import TYPE_CHECKING

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


__SCREAMING_SNAKE_CASE   =   {
    'configuration_transfo_xl': ['TRANSFO_XL_PRETRAINED_CONFIG_ARCHIVE_MAP', 'TransfoXLConfig'],
    'tokenization_transfo_xl': ['TransfoXLCorpus', 'TransfoXLTokenizer'],
}

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		__SCREAMING_SNAKE_CASE   =   [
		    'TRANSFO_XL_PRETRAINED_MODEL_ARCHIVE_LIST',
		    'AdaptiveEmbedding',
		    'TransfoXLForSequenceClassification',
		    'TransfoXLLMHeadModel',
		    'TransfoXLModel',
		    'TransfoXLPreTrainedModel',
		    'load_tf_weights_in_transfo_xl',
		]

try:
		if not is_tf_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		__SCREAMING_SNAKE_CASE   =   [
		    'TF_TRANSFO_XL_PRETRAINED_MODEL_ARCHIVE_LIST',
		    'TFAdaptiveEmbedding',
		    'TFTransfoXLForSequenceClassification',
		    'TFTransfoXLLMHeadModel',
		    'TFTransfoXLMainLayer',
		    'TFTransfoXLModel',
		    'TFTransfoXLPreTrainedModel',
		]


if TYPE_CHECKING:
		from .configuration_transfo_xl import TRANSFO_XL_PRETRAINED_CONFIG_ARCHIVE_MAP, TransfoXLConfig
		from .tokenization_transfo_xl import TransfoXLCorpus, TransfoXLTokenizer

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_transfo_xl import (
				    TRANSFO_XL_PRETRAINED_MODEL_ARCHIVE_LIST,
				    AdaptiveEmbedding,
				    TransfoXLForSequenceClassification,
				    TransfoXLLMHeadModel,
				    TransfoXLModel,
				    TransfoXLPreTrainedModel,
				    load_tf_weights_in_transfo_xl,
				)

		try:
				if not is_tf_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_tf_transfo_xl import (
				    TF_TRANSFO_XL_PRETRAINED_MODEL_ARCHIVE_LIST,
				    TFAdaptiveEmbedding,
				    TFTransfoXLForSequenceClassification,
				    TFTransfoXLLMHeadModel,
				    TFTransfoXLMainLayer,
				    TFTransfoXLModel,
				    TFTransfoXLPreTrainedModel,
				)

else:
		import sys

		__SCREAMING_SNAKE_CASE   =   _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)