





from typing import Callable, Optional

from .. import Features
from ..packaged_modules.generator.generator import Generator
from .abc import AbstractDatasetInputStream

class 					A     (snake_case__					):



      def __init__(       self  ,	lowercase_  ,	lowercase_ = None  ,	lowercase_ = None  ,	lowercase_ = False  ,	lowercase_ = False  ,	lowercase_ = None  ,	lowercase_ = None  ,	**lowercase_  ,	)   -> List[str]:



             '''simple docstring'''

             super().__init__(
                 features=_UpperCAmelCase  ,	cache_dir=_UpperCAmelCase  ,	keep_in_memory=_UpperCAmelCase  ,	streaming=_UpperCAmelCase  ,	num_proc=_UpperCAmelCase  ,	**_UpperCAmelCase  ,	)
             _snake_case   :				str  					=    Generator(
                 cache_dir=_UpperCAmelCase  ,	features=_UpperCAmelCase  ,	generator=_UpperCAmelCase  ,	gen_kwargs=_UpperCAmelCase  ,	**_UpperCAmelCase  ,	)



      def  __a			(       self       )   -> str:



             '''simple docstring'''

             if self.streaming:
                    _snake_case   :				Dict  					=    self.builder.as_streaming_dataset(split='''train'''       )
             # Build regular (map-style) dataset
             else:
                    _snake_case   :				Any  					=    None
                    _snake_case   :				Tuple  					=    None
                    _snake_case   :				Tuple  					=    None
                    _snake_case   :				str  					=    None

                    self.builder.download_and_prepare(
                        download_config=_UpperCAmelCase  ,	download_mode=_UpperCAmelCase  ,	verification_mode=_UpperCAmelCase  ,	base_path=_UpperCAmelCase  ,	num_proc=self.num_proc  ,	)
                    _snake_case   :				int  					=    self.builder.as_dataset(
                        split='''train'''  ,	verification_mode=_UpperCAmelCase  ,	in_memory=self.keep_in_memory       )
             return dataset











'''simple docstring'''

from typing import TYPE_CHECKING

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


SCREAMING_SNAKE_CASE__     :						Tuple	=  {'''configuration_van''': ['''VAN_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''VanConfig''']}


try:
			if not is_torch_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			SCREAMING_SNAKE_CASE__     :						List[str]	=  [
			    '''VAN_PRETRAINED_MODEL_ARCHIVE_LIST''',
			    '''VanForImageClassification''',
			    '''VanModel''',
			    '''VanPreTrainedModel''',
			]

if TYPE_CHECKING:
			from .configuration_van import VAN_PRETRAINED_CONFIG_ARCHIVE_MAP, VanConfig

			try:
						if not is_torch_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_van import (
						    VAN_PRETRAINED_MODEL_ARCHIVE_LIST,
						    VanForImageClassification,
						    VanModel,
						    VanPreTrainedModel,
						)

else:
			import sys

			SCREAMING_SNAKE_CASE__     :						Dict	=  _LazyModule(__name__, globals()['''__file__'''], _import_structure)




