



'''simple docstring'''


import pytest

import datasets.config
from datasets.utils.info_utils import is_small_dataset






@pytest.mark.parametrize("dataset_size"       ,	[None, 4_0_0 * 2**2_0, 6_0_0 * 2**2_0]       )
@pytest.mark.parametrize("input_in_memory_max_size"       ,	["default", 0, 1_0_0 * 2**2_0, 9_0_0 * 2**2_0]       )
def  UpperCAmelCase_       (		lowercase__       ,	lowercase__       ,	lowercase__       ):


					'''simple docstring'''







					if input_in_memory_max_size != "default":
										monkeypatch.setattr(datasets.config       ,	"IN_MEMORY_MAX_SIZE"       ,	__lowercase       )
					a_       		=datasets.config.IN_MEMORY_MAX_SIZE
					if input_in_memory_max_size == "default":
										assert in_memory_max_size == 0
					else:
										assert in_memory_max_size == input_in_memory_max_size
					if dataset_size and in_memory_max_size:
										a_       		=dataset_size < in_memory_max_size
					else:
										a_       		=False
					a_       		=is_small_dataset(__lowercase       )
					assert result == expected







'''simple docstring'''


from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_tf_available,
    is_torch_available,
)


lowercase							       =			{
    '''configuration_vision_encoder_decoder''': ['''VisionEncoderDecoderConfig''', '''VisionEncoderDecoderOnnxConfig''']
}

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  lowercase							       =			['''VisionEncoderDecoderModel''']

try:
  if not is_tf_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  lowercase							       =			['''TFVisionEncoderDecoderModel''']

try:
  if not is_flax_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  lowercase							       =			['''FlaxVisionEncoderDecoderModel''']

if TYPE_CHECKING:
  from .configuration_vision_encoder_decoder import VisionEncoderDecoderConfig, VisionEncoderDecoderOnnxConfig

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_vision_encoder_decoder import VisionEncoderDecoderModel

  try:
    if not is_tf_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_tf_vision_encoder_decoder import TFVisionEncoderDecoderModel

  try:
    if not is_flax_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_flax_vision_encoder_decoder import FlaxVisionEncoderDecoderModel

else:
  import sys

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


