'''simple docstring'''




import unittest

from accelerate import debug_launcher
from accelerate.test_utils import require_cpu, test_ops, test_script





@require_cpu
class 					__magic_name__		(					unittest.TestCase):







			def 			SCREAMING_SNAKE_CASE_  (			self       :						str					):
										debug_launcher(test_script.main					)







			def 			SCREAMING_SNAKE_CASE_  (			self       :						Union[str, Any]					):
										debug_launcher(test_ops.main					)






'''simple docstring'''




import pytest

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




@pytest.mark.parametrize("""dataset_size"""   ,   [None, 400 * 2**20, 600 * 2**20]				)
@pytest.mark.parametrize("""input_in_memory_max_size"""   ,   ["""default""", 0, 100 * 2**20, 900 * 2**20]				)
def 							lowerCamelCase			(   UpperCAmelCase__ :      Union[str, Any]   ,   UpperCAmelCase__ :      List[Any]   ,   UpperCAmelCase__ :      str				)    ->   Any:
							if input_in_memory_max_size != "default":
														monkeypatch.setattr(datasets.config   ,   """IN_MEMORY_MAX_SIZE"""   ,   UpperCAmelCase__				)
							lowercase_      :    List[Any]       		= 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:
														lowercase_      :    str       		= dataset_size < in_memory_max_size
							else:
														lowercase_      :    List[Any]       		= False
							lowercase_      :    Any       		= is_small_dataset(UpperCAmelCase__				)
							assert result == expected





