


from typing import Callable, Optional

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






class     UpperCAmelCase__       (					A_		):



    """simple docstring"""






    def __init__(			self					,   A_					,   A_ = None					,   A_ = None					,   A_ = False					,   A_ = False					,   A_ = None					,   A_ = None					,   **A_					,   )  ->       List[str]:
         super().__init__(
             features=A_					,   cache_dir=A_					,   keep_in_memory=A_					,   streaming=A_					,   num_proc=A_					,   **A_					,   )
         __UpperCamelCase    							=Generator(
             cache_dir=A_					,   features=A_					,   generator=A_					,   gen_kwargs=A_					,   **A_					,   )






    def _a					(			self    )  ->       Any:
         # Build iterable dataset
         if self.streaming:
              __UpperCamelCase    							=self.builder.as_streaming_dataset(split='train'    )
         # Build regular (map-style) dataset
         else:
              __UpperCamelCase    							=None
              __UpperCamelCase    							=None
              __UpperCamelCase    							=None
              __UpperCamelCase    							=None

              self.builder.download_and_prepare(
                  download_config=A_					,   download_mode=A_					,   verification_mode=A_					,   base_path=A_					,   num_proc=self.num_proc					,   )
              __UpperCamelCase    							=self.builder.as_dataset(
                  split='train'					,   verification_mode=A_					,   in_memory=self.keep_in_memory    )
         return dataset









from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_A		       =						{'configuration_sew': ['SEW_PRETRAINED_CONFIG_ARCHIVE_MAP', 'SEWConfig']}

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _A		       =						[
       'SEW_PRETRAINED_MODEL_ARCHIVE_LIST',
       'SEWForCTC',
       'SEWForSequenceClassification',
       'SEWModel',
       'SEWPreTrainedModel',
   ]

if TYPE_CHECKING:
   from .configuration_sew import SEW_PRETRAINED_CONFIG_ARCHIVE_MAP, SEWConfig

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_sew import (
          SEW_PRETRAINED_MODEL_ARCHIVE_LIST,
          SEWForCTC,
          SEWForSequenceClassification,
          SEWModel,
          SEWPreTrainedModel,
      )


else:
   import sys

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





