


from typing import Optional

from .. import Features, NamedSplit
from ..packaged_modules.text.text import Text
from ..utils.typing import NestedDataStructureLike, PathLike
from .abc import AbstractDatasetReader






class    _UpperCamelCase     (       __snake_case					):

				"""simple docstring"""







				def __init__(    self					, a__					, a__ = None					, a__ = None					, a__ = None					, a__ = False					, a__ = False					, a__ = None					, **a__					, )						->					List[Any]:
					super().__init__(
					    a__					, split=a__					, features=a__					, cache_dir=a__					, keep_in_memory=a__					, streaming=a__					, num_proc=a__					, **a__					, )
					A             =					path_or_paths if isinstance(a__					, a__ ) else {self.split: path_or_paths}
					A             =					Text(
					    cache_dir=a__					, data_files=a__					, features=a__					, **a__					, )

				def   _UpperCAmelCase       (    self )						->					Tuple:
					# Build iterable dataset
					if self.streaming:
						A             =					self.builder.as_streaming_dataset(split=self.split )
					# Build regular (map-style) dataset
					else:
						A             =					None
						A             =					None
						A             =					None
						A             =					None

						self.builder.download_and_prepare(
						    download_config=a__					, download_mode=a__					, verification_mode=a__					, base_path=a__					, num_proc=self.num_proc					, )
						A             =					self.builder.as_dataset(
						    split=self.split					, verification_mode=a__					, in_memory=self.keep_in_memory )
					return dataset







_lowercase							:   Dict						=						"0.21.0"

from .accelerator import Accelerator
from .big_modeling import (
    cpu_offload,
    cpu_offload_with_hook,
    disk_offload,
    dispatch_model,
    init_empty_weights,
    init_on_device,
    load_checkpoint_and_dispatch,
)
from .data_loader import skip_first_batches
from .launchers import debug_launcher, notebook_launcher
from .state import PartialState
from .utils import (
    DeepSpeedPlugin,
    DistributedDataParallelKwargs,
    DistributedType,
    FullyShardedDataParallelPlugin,
    GradScalerKwargs,
    InitProcessGroupKwargs,
    find_executable_batch_size,
    infer_auto_device_map,
    is_rich_available,
    load_checkpoint_in_model,
    synchronize_rng_states,
)


if is_rich_available():
				from .utils import rich



