


import pytest

import datasets


# Import fixture modules as plugins
lowercase__							:							Any									=			["""tests.fixtures.files""", """tests.fixtures.hub""", """tests.fixtures.fsspec"""]




def 	A_ (							snake_case							:   Optional[Any] ,      snake_case							:   str )      ->    Tuple:



						'''simple docstring'''

						for item in items:
												if any(marker in item.keywords for marker in ['''integration''', '''unit'''] ):
																		continue
												item.add_marker(pytest.mark.unit )




def 	A_ (							snake_case							:   Optional[Any] )      ->    Optional[Any]:



						'''simple docstring'''

						config.addinivalue_line('''markers''' ,      '''torchaudio_latest: mark test to run with torchaudio>=0.12''' )




@pytest.fixture(autouse=UpperCamelCase__ )
def 	A_ (							snake_case							:   List[Any] ,      snake_case							:   str )      ->    Dict:



						'''simple docstring'''

						__UpperCamelCase       =			tmp_path_factory.getbasetemp() / '''cache'''
						__UpperCamelCase       =			test_hf_cache_home / '''datasets'''
						__UpperCamelCase       =			test_hf_cache_home / '''metrics'''
						__UpperCamelCase       =			test_hf_cache_home / '''modules'''
						monkeypatch.setattr('''datasets.config.HF_DATASETS_CACHE''' ,      str(UpperCamelCase__ ) )
						monkeypatch.setattr('''datasets.config.HF_METRICS_CACHE''' ,      str(UpperCamelCase__ ) )
						monkeypatch.setattr('''datasets.config.HF_MODULES_CACHE''' ,      str(UpperCamelCase__ ) )
						__UpperCamelCase       =			test_hf_datasets_cache / '''downloads'''
						monkeypatch.setattr('''datasets.config.DOWNLOADED_DATASETS_PATH''' ,      str(UpperCamelCase__ ) )
						__UpperCamelCase       =			test_hf_datasets_cache / '''downloads''' / '''extracted'''
						monkeypatch.setattr('''datasets.config.EXTRACTED_DATASETS_PATH''' ,      str(UpperCamelCase__ ) )




@pytest.fixture(autouse=UpperCamelCase__ ,      scope='''session''' )
def 	A_ (							)      ->    Dict:



						'''simple docstring'''

						datasets.disable_progress_bar()




@pytest.fixture(autouse=UpperCamelCase__ )
def 	A_ (							snake_case							:   Any )      ->    Union[str, Any]:



						'''simple docstring'''

						monkeypatch.setattr('''datasets.config.HF_UPDATE_DOWNLOAD_COUNTS''' ,      UpperCamelCase__ )




@pytest.fixture
def 	A_ (							snake_case							:   List[Any] )      ->    Tuple:



						'''simple docstring'''

						monkeypatch.setattr('''sqlalchemy.util.deprecations.SILENCE_UBER_WARNING''' ,      UpperCamelCase__ )






import unittest

from diffusers import FlaxAutoencoderKL
from diffusers.utils import is_flax_available
from diffusers.utils.testing_utils import require_flax

from .test_modeling_common_flax import FlaxModelTesterMixin


if is_flax_available():
				import jax






@require_flax
class        SCREAMING_SNAKE_CASE__    (							SCREAMING_SNAKE_CASE_   ,		unittest.TestCase    ):

							"""simple docstring"""






							_snake_case     		=  FlaxAutoencoderKL



							@property
							def     A__		(  self			)->   int:





													'''simple docstring'''






													__UpperCamelCase       =			4
													__UpperCamelCase       =			3
													__UpperCamelCase       =			(32, 32)

													__UpperCamelCase       =			jax.random.PRNGKey(0			)
													__UpperCamelCase       =			jax.random.uniform(SCREAMING_SNAKE_CASE_     ,	((batch_size, num_channels) + sizes)			)

													return {"sample": image, "prng_key": prng_key}



							def     A__		(  self			)->   List[Any]:





													'''simple docstring'''






													__UpperCamelCase       =			{
													    '''block_out_channels''': [32, 64],
													    '''in_channels''': 3,
													    '''out_channels''': 3,
													    '''down_block_types''': ['''DownEncoderBlock2D''', '''DownEncoderBlock2D'''],
													    '''up_block_types''': ['''UpDecoderBlock2D''', '''UpDecoderBlock2D'''],
													    '''latent_channels''': 4,
													}
													__UpperCamelCase       =			self.dummy_input
													return init_dict, inputs_dict




