


__UpperCamelCase				:				int  				= frozenset(
    [
        "prompt",
        "height",
        "width",
        "guidance_scale",
        "negative_prompt",
        "prompt_embeds",
        "negative_prompt_embeds",
        "cross_attention_kwargs",
    ]
)

__UpperCamelCase				:				List[Any]  				= frozenset(["prompt", "negative_prompt"])

__UpperCamelCase				:				Tuple  				= frozenset([])

__UpperCamelCase				:				Union[str, Any]  				= frozenset(["image"])

__UpperCamelCase				:				Tuple  				= frozenset(
    [
        "image",
        "height",
        "width",
        "guidance_scale",
    ]
)

__UpperCamelCase				:				str  				= frozenset(["image"])

__UpperCamelCase				:				Optional[int]  				= frozenset(
    [
        "prompt",
        "image",
        "height",
        "width",
        "guidance_scale",
        "negative_prompt",
        "prompt_embeds",
        "negative_prompt_embeds",
    ]
)

__UpperCamelCase				:				Union[str, Any]  				= frozenset(["prompt", "image", "negative_prompt"])

__UpperCamelCase				:				Dict  				= frozenset(
    [
        # Text guided image variation with an image mask
        "prompt",
        "image",
        "mask_image",
        "height",
        "width",
        "guidance_scale",
        "negative_prompt",
        "prompt_embeds",
        "negative_prompt_embeds",
    ]
)

__UpperCamelCase				:				Any  				= frozenset(["prompt", "image", "mask_image", "negative_prompt"])

__UpperCamelCase				:				Dict  				= frozenset(
    [
        # image variation with an image mask
        "image",
        "mask_image",
        "height",
        "width",
        "guidance_scale",
    ]
)

__UpperCamelCase				:				Any  				= frozenset(["image", "mask_image"])

__UpperCamelCase				:				Optional[int]  				= frozenset(
    [
        "example_image",
        "image",
        "mask_image",
        "height",
        "width",
        "guidance_scale",
    ]
)

__UpperCamelCase				:				Dict  				= frozenset(["example_image", "image", "mask_image"])

__UpperCamelCase				:				Union[str, Any]  				= frozenset(["class_labels"])

__UpperCamelCase				:				Dict  				= frozenset(["class_labels"])

__UpperCamelCase				:				Any  				= frozenset(["batch_size"])

__UpperCamelCase				:				Union[str, Any]  				= frozenset([])

__UpperCamelCase				:				Any  				= frozenset(["batch_size"])

__UpperCamelCase				:				Optional[Any]  				= frozenset([])

__UpperCamelCase				:				int  				= frozenset(
    [
        "prompt",
        "audio_length_in_s",
        "guidance_scale",
        "negative_prompt",
        "prompt_embeds",
        "negative_prompt_embeds",
        "cross_attention_kwargs",
    ]
)

__UpperCamelCase				:				Union[str, Any]  				= frozenset(["prompt", "negative_prompt"])
__UpperCamelCase				:				str  				= frozenset(["input_tokens"])

__UpperCamelCase				:				Any  				= frozenset(["input_tokens"])










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       _UpperCAmelCase					(       A__	):

				"""simple docstring"""




				def __init__(     self						:    Dict,  lowerCamelCase						:    pyspark.sql.DataFrame,  lowerCamelCase						:    Optional[NamedSplit] = None,  lowerCamelCase						:    Optional[Features] = None,  lowerCamelCase						:    bool = True,  lowerCamelCase						:    str = None,  lowerCamelCase						:    bool = False,  lowerCamelCase						:    str = None,  lowerCamelCase						:    bool = True,  lowerCamelCase						:    str = "arrow",  **lowerCamelCase						:    str,  ):

								'''simple docstring'''
								super().__init__(
								    split=lowerCamelCase,  features=lowerCamelCase,  cache_dir=lowerCamelCase,  keep_in_memory=lowerCamelCase,  streaming=lowerCamelCase,  **lowerCamelCase,  )
								lowercase__    =			load_from_cache_file
								lowercase__    =			file_format
								lowercase__    =			Spark(
								    df=lowerCamelCase,  features=lowerCamelCase,  cache_dir=lowerCamelCase,  working_dir=lowerCamelCase,  **lowerCamelCase,  )




				def 				lowercase__   (     self						:    List[Any]  ):

								'''simple docstring'''
								if self.streaming:
												return self.builder.as_streaming_dataset(split=self.split  )
								lowercase__    =			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  )




