






from typing import TYPE_CHECKING

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


A_		:		Tuple		     =			{
    'configuration_falcon': ['FALCON_PRETRAINED_CONFIG_ARCHIVE_MAP', 'FalconConfig'],
}

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   A_		:		Tuple		     =			[
       'FALCON_PRETRAINED_MODEL_ARCHIVE_LIST',
       'FalconForCausalLM',
       'FalconModel',
       'FalconPreTrainedModel',
       'FalconForSequenceClassification',
       'FalconForTokenClassification',
       'FalconForQuestionAnswering',
   ]


if TYPE_CHECKING:
   from .configuration_falcon import FALCON_PRETRAINED_CONFIG_ARCHIVE_MAP, FalconConfig

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_falcon import (
          FALCON_PRETRAINED_MODEL_ARCHIVE_LIST,
          FalconForCausalLM,
          FalconForQuestionAnswering,
          FalconForSequenceClassification,
          FalconForTokenClassification,
          FalconModel,
          FalconPreTrainedModel,
      )


else:
   import sys

   A_		:		Union[str, Any]		     =			_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)







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
A_		:		List[str]		     =			'.'


if __name__ == "__main__":
   A_		:		Dict		     =			os.path.join(REPO_PATH, 'utils/documentation_tests.txt')
   A_		:		Dict		     =			[]
   A_		:		Optional[Any]		     =			[]
   with open(doctest_file_path) as fp:
      for line in fp:
         A_		:		Tuple		     =			line.strip()
         A_		:		Any		     =			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:
      A_		:		str		     =			'\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.')