






from typing import Optional

import pyspark

from .. import Features, NamedSplit
from ..download import DownloadMode
from ..packaged_modules.spark.spark import Spark
from .abc import AbstractDatasetReader
class     lowerCamelCase_					(   lowerCamelCase			):







				def __init__(    self							,       __lowerCAmelCase							,       __lowerCAmelCase = None							,       __lowerCAmelCase = None							,       __lowerCAmelCase = True							,       __lowerCAmelCase = None							,       __lowerCAmelCase = False							,       __lowerCAmelCase = None							,       __lowerCAmelCase = True							,       __lowerCAmelCase = "arrow"							,       **__lowerCAmelCase							,       ):
								"""simple docstring"""
								super().__init__(
								    split=__lowerCAmelCase							,       features=__lowerCAmelCase							,       cache_dir=__lowerCAmelCase							,       keep_in_memory=__lowerCAmelCase							,       streaming=__lowerCAmelCase							,       **__lowerCAmelCase							,       )
								__magic_name__		:int   =   load_from_cache_file
								__magic_name__		:List[str]   =   file_format
								__magic_name__		:Dict   =   Spark(
								    df=__lowerCAmelCase							,       features=__lowerCAmelCase							,       cache_dir=__lowerCAmelCase							,       working_dir=__lowerCAmelCase							,       **__lowerCAmelCase							,       )







				def       A						(    self  ):
								"""simple docstring"""
								if self.streaming:
												return self.builder.as_streaming_dataset(split=self.split  )
								__magic_name__		:Union[str, Any]   =   None if self._load_from_cache_file else DownloadMode.FORCE_REDOWNLOAD
								self.builder.download_and_prepare(
								    download_mode=__lowerCAmelCase							,       file_format=self._file_format							,       )
								return self.builder.as_dataset(split=self.split  )









"""simple docstring"""




A_				:      Any           =			"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


