






import os


# All paths are set with the intent you should run this script from the root of the repo with the command
# python utils/check_doctest_list.py
_UpperCamelCase			:	Optional[int]								='.'


if __name__ == "__main__":
	_UpperCamelCase			:	List[str]								=os.path.join(REPO_PATH, 'utils/documentation_tests.txt')
	_UpperCamelCase			:	str								=[]
	_UpperCamelCase			:	str								=[]
	with open(doctest_file_path) as fp:
		for line in fp:
			_UpperCamelCase			:	Tuple								=line.strip()
			_UpperCamelCase			:	str								=os.path.join(REPO_PATH, line)
			if not (os.path.isfile(path) or os.path.isdir(path)):
				non_existent_paths.append(line)
			all_paths.append(path)
	if len(non_existent_paths) > 0:
		_UpperCamelCase			:	Optional[int]								='\n'.join(non_existent_paths)
		raise ValueError(f'''`utils/documentation_tests.txt` contains non-existent paths:\n{non_existent_paths}''')
	if all_paths != sorted(all_paths):
		raise ValueError('Files in `utils/documentation_tests.txt` are not in alphabetical order.')











import warnings


warnings.warn(
    'memory_utils has been reorganized to utils.memory. Import `find_executable_batchsize` from the main `__init__`: '
    '`from accelerate import find_executable_batch_size` to avoid this warning.',
    FutureWarning,
)



