import collections
import os
import re
from pathlib import Path


__lowercase     :   List[str]											=      '''src/transformers'''


# Matches is_xxx_available()
__lowercase     :   Union[str, Any]											=      re.compile(r'''is\_([a-z_]*)_available()''')
# Catches a one-line _import_struct = {xxx}
__lowercase     :   Union[str, Any]											=      re.compile(r'''^_import_structure\s+=\s+\{([^\}]+)\}''')
# Catches a line with a key-values pattern: "bla": ["foo", "bar"]
__lowercase     :   Dict											=      re.compile(r'''\s+"\S*":\s+\[([^\]]*)\]''')
# Catches a line if not is_foo_available
__lowercase     :   Dict											=      re.compile(r'''^\s*if\s+not\s+is\_[a-z_]*\_available\(\)''')
# Catches a line _import_struct["bla"].append("foo")
__lowercase     :   Any											=      re.compile(r'''^\s*_import_structure\["\S*"\]\.append\("(\S*)"\)''')
# Catches a line _import_struct["bla"].extend(["foo", "bar"]) or _import_struct["bla"] = ["foo", "bar"]
__lowercase     :   Dict											=      re.compile(r'''^\s*_import_structure\[\S*\](?:\.extend\(|\s*=\s+)\[([^\]]*)\]''')
# Catches a line with an object between quotes and a comma:     "MyModel",
__lowercase     :   List[Any]											=      re.compile(r'''^\s+"([^"]+)",''')
# Catches a line with objects between brackets only:    ["foo", "bar"],
__lowercase     :   List[Any]											=      re.compile(r'''^\s+\[([^\]]+)\]''')
# Catches a line with from foo import bar, bla, boo
__lowercase     :   Dict											=      re.compile(r'''\s+from\s+\S*\s+import\s+([^\(\s].*)\n''')
# Catches a line with try:
__lowercase     :   int											=      re.compile(r'''^\s*try:''')
# Catches a line with else:
__lowercase     :   Tuple											=      re.compile(r'''^\s*else:''')



def lowerCamelCase						(     SCREAMING_SNAKE_CASE			):
    '''simple docstring'''







    if _re_test_backend.search(SCREAMING_SNAKE_CASE			) is None:
        return None
    __UpperCamelCase  :int    						=	[b[0] for b in _re_backend.findall(SCREAMING_SNAKE_CASE			)]
    backends.sort()
    return "_and_".join(SCREAMING_SNAKE_CASE			)



def lowerCamelCase						(     SCREAMING_SNAKE_CASE			):
    '''simple docstring'''







    with open(SCREAMING_SNAKE_CASE						,    '''r'''						,    encoding='''utf-8'''						,    newline='''\n'''			) as f:
        __UpperCamelCase  :Dict    						=	f.readlines()

    __UpperCamelCase  :Tuple    						=	0
    while line_index < len(SCREAMING_SNAKE_CASE			) and not lines[line_index].startswith('''_import_structure = {'''			):
        line_index += 1

    # If this is a traditional init, just return.
    if line_index >= len(SCREAMING_SNAKE_CASE			):
        return None

    # First grab the objects without a specific backend in _import_structure
    __UpperCamelCase  :List[str]    						=	[]
    while not lines[line_index].startswith('''if TYPE_CHECKING'''			) and find_backend(lines[line_index]			) is None:
        __UpperCamelCase  :str    						=	lines[line_index]
        # If we have everything on a single line, let's deal with it.
        if _re_one_line_import_struct.search(SCREAMING_SNAKE_CASE			):
            __UpperCamelCase  :Union[str, Any]    						=	_re_one_line_import_struct.search(SCREAMING_SNAKE_CASE			).groups()[0]
            __UpperCamelCase  :List[str]    						=	re.findall(R'''\[([^\]]+)\]'''						,    SCREAMING_SNAKE_CASE			)
            for imp in imports:
                objects.extend([obj[1:-1] for obj in imp.split(''', '''			)]			)
            line_index += 1
            continue
        __UpperCamelCase  :List[Any]    						=	_re_import_struct_key_value.search(SCREAMING_SNAKE_CASE			)
        if single_line_import_search is not None:
            __UpperCamelCase  :List[str]    						=	[obj[1:-1] for obj in single_line_import_search.groups()[0].split(''', '''			) if len(SCREAMING_SNAKE_CASE			) > 0]
            objects.extend(SCREAMING_SNAKE_CASE			)
        elif line.startswith(''' ''' * 8 + '''"'''			):
            objects.append(line[9:-3]			)
        line_index += 1

    __UpperCamelCase  :Any    						=	{'''none''': objects}
    # Let's continue with backend-specific objects in _import_structure
    while not lines[line_index].startswith('''if TYPE_CHECKING'''			):
        # If the line is an if not is_backend_available, we grab all objects associated.
        __UpperCamelCase  :Any    						=	find_backend(lines[line_index]			)
        # Check if the backend declaration is inside a try block:
        if _re_try.search(lines[line_index - 1]			) is None:
            __UpperCamelCase  :List[str]    						=	None

        if backend is not None:
            line_index += 1

            # Scroll until we hit the else block of try-except-else
            while _re_else.search(lines[line_index]			) is None:
                line_index += 1

            line_index += 1

            __UpperCamelCase  :str    						=	[]
            # Until we unindent, add backend objects to the list
            while len(lines[line_index]			) <= 1 or lines[line_index].startswith(''' ''' * 4			):
                __UpperCamelCase  :Dict    						=	lines[line_index]
                if _re_import_struct_add_one.search(SCREAMING_SNAKE_CASE			) is not None:
                    objects.append(_re_import_struct_add_one.search(SCREAMING_SNAKE_CASE			).groups()[0]			)
                elif _re_import_struct_add_many.search(SCREAMING_SNAKE_CASE			) is not None:
                    __UpperCamelCase  :List[Any]    						=	_re_import_struct_add_many.search(SCREAMING_SNAKE_CASE			).groups()[0].split(''', '''			)
                    __UpperCamelCase  :Dict    						=	[obj[1:-1] for obj in imports if len(SCREAMING_SNAKE_CASE			) > 0]
                    objects.extend(SCREAMING_SNAKE_CASE			)
                elif _re_between_brackets.search(SCREAMING_SNAKE_CASE			) is not None:
                    __UpperCamelCase  :Union[str, Any]    						=	_re_between_brackets.search(SCREAMING_SNAKE_CASE			).groups()[0].split(''', '''			)
                    __UpperCamelCase  :Any    						=	[obj[1:-1] for obj in imports if len(SCREAMING_SNAKE_CASE			) > 0]
                    objects.extend(SCREAMING_SNAKE_CASE			)
                elif _re_quote_object.search(SCREAMING_SNAKE_CASE			) is not None:
                    objects.append(_re_quote_object.search(SCREAMING_SNAKE_CASE			).groups()[0]			)
                elif line.startswith(''' ''' * 8 + '''"'''			):
                    objects.append(line[9:-3]			)
                elif line.startswith(''' ''' * 12 + '''"'''			):
                    objects.append(line[13:-3]			)
                line_index += 1

            __UpperCamelCase  :Optional[Any]    						=	objects
        else:
            line_index += 1

    # At this stage we are in the TYPE_CHECKING part, first grab the objects without a specific backend
    __UpperCamelCase  :int    						=	[]
    while (
        line_index < len(SCREAMING_SNAKE_CASE			)
        and find_backend(lines[line_index]			) is None
        and not lines[line_index].startswith('''else'''			)
    ):
        __UpperCamelCase  :Dict    						=	lines[line_index]
        __UpperCamelCase  :Optional[int]    						=	_re_import.search(SCREAMING_SNAKE_CASE			)
        if single_line_import_search is not None:
            objects.extend(single_line_import_search.groups()[0].split(''', '''			)			)
        elif line.startswith(''' ''' * 8			):
            objects.append(line[8:-2]			)
        line_index += 1

    __UpperCamelCase  :int    						=	{'''none''': objects}
    # Let's continue with backend-specific objects
    while line_index < len(SCREAMING_SNAKE_CASE			):
        # If the line is an if is_backend_available, we grab all objects associated.
        __UpperCamelCase  :List[Any]    						=	find_backend(lines[line_index]			)
        # Check if the backend declaration is inside a try block:
        if _re_try.search(lines[line_index - 1]			) is None:
            __UpperCamelCase  :List[str]    						=	None

        if backend is not None:
            line_index += 1

            # Scroll until we hit the else block of try-except-else
            while _re_else.search(lines[line_index]			) is None:
                line_index += 1

            line_index += 1

            __UpperCamelCase  :int    						=	[]
            # Until we unindent, add backend objects to the list
            while len(lines[line_index]			) <= 1 or lines[line_index].startswith(''' ''' * 8			):
                __UpperCamelCase  :Any    						=	lines[line_index]
                __UpperCamelCase  :int    						=	_re_import.search(SCREAMING_SNAKE_CASE			)
                if single_line_import_search is not None:
                    objects.extend(single_line_import_search.groups()[0].split(''', '''			)			)
                elif line.startswith(''' ''' * 12			):
                    objects.append(line[12:-2]			)
                line_index += 1

            __UpperCamelCase  :Any    						=	objects
        else:
            line_index += 1

    return import_dict_objects, type_hint_objects



def lowerCamelCase						(     SCREAMING_SNAKE_CASE						,    SCREAMING_SNAKE_CASE			):
    '''simple docstring'''







    def find_duplicates(SCREAMING_SNAKE_CASE			):
        return [k for k, v in collections.Counter(SCREAMING_SNAKE_CASE			).items() if v > 1]

    if list(import_dict_objects.keys()			) != list(type_hint_objects.keys()			):
        return ["Both sides of the init do not have the same backends!"]

    __UpperCamelCase  :Optional[int]    						=	[]
    for key in import_dict_objects.keys():
        __UpperCamelCase  :Union[str, Any]    						=	find_duplicates(import_dict_objects[key]			)
        if duplicate_imports:
            errors.append(f"""Duplicate _import_structure definitions for: {duplicate_imports}"""			)
        __UpperCamelCase  :Any    						=	find_duplicates(type_hint_objects[key]			)
        if duplicate_type_hints:
            errors.append(f"""Duplicate TYPE_CHECKING objects for: {duplicate_type_hints}"""			)

        if sorted(set(import_dict_objects[key]			)			) != sorted(set(type_hint_objects[key]			)			):
            __UpperCamelCase  :Optional[Any]    						=	'''base imports''' if key == '''none''' else f"""{key} backend"""
            errors.append(f"""Differences for {name}:"""			)
            for a in type_hint_objects[key]:
                if a not in import_dict_objects[key]:
                    errors.append(f"""  {a} in TYPE_HINT but not in _import_structure."""			)
            for a in import_dict_objects[key]:
                if a not in type_hint_objects[key]:
                    errors.append(f"""  {a} in _import_structure but not in TYPE_HINT."""			)
    return errors



def lowerCamelCase						(     ):
    '''simple docstring'''







    __UpperCamelCase  :str    						=	[]
    for root, _, files in os.walk(SCREAMING_SNAKE_CASE			):
        if "__init__.py" in files:
            __UpperCamelCase  :Optional[int]    						=	os.path.join(SCREAMING_SNAKE_CASE						,    '''__init__.py'''			)
            __UpperCamelCase  :List[Any]    						=	parse_init(SCREAMING_SNAKE_CASE			)
            if objects is not None:
                __UpperCamelCase  :List[str]    						=	analyze_results(*SCREAMING_SNAKE_CASE			)
                if len(SCREAMING_SNAKE_CASE			) > 0:
                    __UpperCamelCase  :Union[str, Any]    						=	f"""Problem in {fname}, both halves do not define the same objects.\n{errors[0]}"""
                    failures.append('''\n'''.join(SCREAMING_SNAKE_CASE			)			)
    if len(SCREAMING_SNAKE_CASE			) > 0:
        raise ValueError('''\n\n'''.join(SCREAMING_SNAKE_CASE			)			)



def lowerCamelCase						(     ):
    '''simple docstring'''







    __UpperCamelCase  :Dict    						=	[]
    for path, directories, files in os.walk(SCREAMING_SNAKE_CASE			):
        for folder in directories:
            # Ignore private modules
            if folder.startswith('''_'''			):
                directories.remove(SCREAMING_SNAKE_CASE			)
                continue
            # Ignore leftovers from branches (empty folders apart from pycache)
            if len(list((Path(SCREAMING_SNAKE_CASE			) / folder).glob('''*.py'''			)			)			) == 0:
                continue
            __UpperCamelCase  :Tuple    						=	str((Path(SCREAMING_SNAKE_CASE			) / folder).relative_to(SCREAMING_SNAKE_CASE			)			)
            __UpperCamelCase  :Optional[int]    						=	short_path.replace(os.path.sep						,    '''.'''			)
            submodules.append(SCREAMING_SNAKE_CASE			)
        for fname in files:
            if fname == "__init__.py":
                continue
            __UpperCamelCase  :str    						=	str((Path(SCREAMING_SNAKE_CASE			) / fname).relative_to(SCREAMING_SNAKE_CASE			)			)
            __UpperCamelCase  :Dict    						=	short_path.replace('''.py'''						,    ''''''			).replace(os.path.sep						,    '''.'''			)
            if len(submodule.split('''.'''			)			) == 1:
                submodules.append(SCREAMING_SNAKE_CASE			)
    return submodules


__lowercase     :   List[str]											=      [
    '''convert_pytorch_checkpoint_to_tf2''',
    '''modeling_flax_pytorch_utils''',
    '''models.esm.openfold_utils''',
]



def lowerCamelCase						(     ):
    '''simple docstring'''







    from transformers.utils import direct_transformers_import

    __UpperCamelCase  :Any    						=	direct_transformers_import(SCREAMING_SNAKE_CASE			)

    __UpperCamelCase  :Tuple    						=	set(transformers._import_structure.keys()			)
    # This contains all the base keys of the _import_structure object defined in the init, but if the user is missing
    # some optional dependencies, they may not have all of them. Thus we read the init to read all additions and
    # (potentiall re-) add them.
    with open(os.path.join(SCREAMING_SNAKE_CASE						,    '''__init__.py'''			)						,    '''r'''			) as f:
        __UpperCamelCase  :Optional[int]    						=	f.read()
    import_structure_keys.update(set(re.findall(R'''import_structure\[\"([^\"]*)\"\]'''						,    SCREAMING_SNAKE_CASE			)			)			)

    __UpperCamelCase  :Dict    						=	[
        module
        for module in get_transformers_submodules()
        if module not in IGNORE_SUBMODULES and module not in import_structure_keys
    ]

    if len(SCREAMING_SNAKE_CASE			) > 0:
        __UpperCamelCase  :Dict    						=	'''\n'''.join(f"""- {module}""" for module in module_not_registered			)
        raise ValueError(
            '''The following submodules are not properly registed in the main init of Transformers:\n'''
            f"""{list_of_modules}\n"""
            '''Make sure they appear somewhere in the keys of `_import_structure` with an empty list as value.'''			)


if __name__ == "__main__":
    check_all_inits()
    check_submodules()






import unittest

from transformers import EsmConfig, is_torch_available
from transformers.testing_utils import TestCasePlus, require_torch, slow, torch_device

from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, ids_tensor, random_attention_mask
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
    import torch

    from transformers.models.esm.modeling_esmfold import EsmForProteinFolding


class 			lowerCamelCase_  :






    '''simple docstring'''






    def __init__(			self				,				__lowercase				,				__lowercase=13				,				__lowercase=7				,				__lowercase=False				,				__lowercase=True				,				__lowercase=False				,				__lowercase=False				,				__lowercase=19				,				__lowercase=32				,				__lowercase=5				,				__lowercase=4				,				__lowercase=37				,				__lowercase="gelu"				,				__lowercase=0.1				,				__lowercase=0.1				,				__lowercase=512				,				__lowercase=16				,				__lowercase=2				,				__lowercase=0.02				,				__lowercase=3				,				__lowercase=4				,				__lowercase=None				,				) ->			Optional[Any]:
        __UpperCamelCase  :Dict    						=	parent
        __UpperCamelCase  :Optional[Any]    						=	batch_size
        __UpperCamelCase  :Any    						=	seq_length
        __UpperCamelCase  :List[str]    						=	is_training
        __UpperCamelCase  :Any    						=	use_input_mask
        __UpperCamelCase  :Optional[int]    						=	use_token_type_ids
        __UpperCamelCase  :List[str]    						=	use_labels
        __UpperCamelCase  :Tuple    						=	vocab_size
        __UpperCamelCase  :List[Any]    						=	hidden_size
        __UpperCamelCase  :Optional[Any]    						=	num_hidden_layers
        __UpperCamelCase  :List[Any]    						=	num_attention_heads
        __UpperCamelCase  :Dict    						=	intermediate_size
        __UpperCamelCase  :List[str]    						=	hidden_act
        __UpperCamelCase  :Any    						=	hidden_dropout_prob
        __UpperCamelCase  :Union[str, Any]    						=	attention_probs_dropout_prob
        __UpperCamelCase  :Optional[Any]    						=	max_position_embeddings
        __UpperCamelCase  :List[Any]    						=	type_vocab_size
        __UpperCamelCase  :int    						=	type_sequence_label_size
        __UpperCamelCase  :str    						=	initializer_range
        __UpperCamelCase  :Optional[Any]    						=	num_labels
        __UpperCamelCase  :int    						=	num_choices
        __UpperCamelCase  :Optional[Any]    						=	scope







    def     UpperCamelCase__     (			self) ->			List[Any]:
        __UpperCamelCase  :int    						=	ids_tensor([self.batch_size, self.seq_length]				,				self.vocab_size)

        __UpperCamelCase  :int    						=	None
        if self.use_input_mask:
            __UpperCamelCase  :Optional[Any]    						=	random_attention_mask([self.batch_size, self.seq_length])

        __UpperCamelCase  :Dict    						=	None
        __UpperCamelCase  :List[Any]    						=	None
        __UpperCamelCase  :Tuple    						=	None
        if self.use_labels:
            __UpperCamelCase  :Union[str, Any]    						=	ids_tensor([self.batch_size]				,				self.type_sequence_label_size)
            __UpperCamelCase  :Union[str, Any]    						=	ids_tensor([self.batch_size, self.seq_length]				,				self.num_labels)
            __UpperCamelCase  :str    						=	ids_tensor([self.batch_size]				,				self.num_choices)

        __UpperCamelCase  :Optional[Any]    						=	self.get_config()

        return config, input_ids, input_mask, sequence_labels, token_labels, choice_labels







    def     UpperCamelCase__     (			self) ->			Optional[int]:
        __UpperCamelCase  :int    						=	EsmConfig(
            vocab_size=33				,				hidden_size=self.hidden_size				,				pad_token_id=1				,				num_hidden_layers=self.num_hidden_layers				,				num_attention_heads=self.num_attention_heads				,				intermediate_size=self.intermediate_size				,				hidden_act=self.hidden_act				,				hidden_dropout_prob=self.hidden_dropout_prob				,				attention_probs_dropout_prob=self.attention_probs_dropout_prob				,				max_position_embeddings=self.max_position_embeddings				,				type_vocab_size=self.type_vocab_size				,				initializer_range=self.initializer_range				,				is_folding_model=__lowercase				,				esmfold_config={'''trunk''': {'''num_blocks''': 2}, '''fp16_esm''': False}				,				)
        return config







    def     UpperCamelCase__     (			self				,				__lowercase				,				__lowercase				,				__lowercase				,				__lowercase				,				__lowercase				,				__lowercase) ->			Union[str, Any]:
        __UpperCamelCase  :int    						=	EsmForProteinFolding(config=__lowercase).float()
        model.to(__lowercase)
        model.eval()
        __UpperCamelCase  :Tuple    						=	model(__lowercase				,				attention_mask=__lowercase)
        __UpperCamelCase  :Any    						=	model(__lowercase)
        __UpperCamelCase  :Optional[Any]    						=	model(__lowercase)

        self.parent.assertEqual(result.positions.shape				,				(8, self.batch_size, self.seq_length, 14, 3))
        self.parent.assertEqual(result.angles.shape				,				(8, self.batch_size, self.seq_length, 7, 2))







    def     UpperCamelCase__     (			self) ->			Optional[Any]:
        __UpperCamelCase  :Dict    						=	self.prepare_config_and_inputs()
        (
            (
            __UpperCamelCase
        )						, (
            __UpperCamelCase
        )						, (
            __UpperCamelCase
        )						, (
            __UpperCamelCase
        )						, (
            __UpperCamelCase
        )						, (
            __UpperCamelCase
        )						, 
        )  :List[str]    						=	config_and_inputs
        __UpperCamelCase  :Tuple    						=	{'''input_ids''': input_ids, '''attention_mask''': input_mask}
        return config, inputs_dict


@require_torch
class 			lowerCamelCase_  (     UpperCAmelCase_		,			UpperCAmelCase_		,			unittest.TestCase				):






    '''simple docstring'''






    a__			:		Optional[int]      			=   False

    a__			:		Optional[int]      			=   (EsmForProteinFolding,) if is_torch_available() else ()
    a__			:		str      			=   ()
    a__			:		Tuple      			=   {} if is_torch_available() else {}
    a__			:		List[Any]      			=   False







    def     UpperCamelCase__     (			self) ->			Tuple:
        __UpperCamelCase  :Dict    						=	EsmFoldModelTester(self)
        __UpperCamelCase  :Dict    						=	ConfigTester(self				,				config_class=__lowercase				,				hidden_size=37)







    def     UpperCamelCase__     (			self) ->			List[Any]:
        self.config_tester.run_common_tests()







    def     UpperCamelCase__     (			self) ->			List[str]:
        __UpperCamelCase  :Any    						=	self.model_tester.prepare_config_and_inputs()
        self.model_tester.create_and_check_model(*__lowercase)







    @unittest.skip('''Does not support attention outputs''')
    def     UpperCamelCase__     (			self) ->			Any:
        pass







    @unittest.skip
    def     UpperCamelCase__     (			self) ->			Any:
        pass







    @unittest.skip('''Esm does not support embedding resizing''')
    def     UpperCamelCase__     (			self) ->			Union[str, Any]:
        pass







    @unittest.skip('''Esm does not support embedding resizing''')
    def     UpperCamelCase__     (			self) ->			Optional[Any]:
        pass







    @unittest.skip('''ESMFold does not support passing input embeds!''')
    def     UpperCamelCase__     (			self) ->			List[Any]:
        pass







    @unittest.skip('''ESMFold does not support head pruning.''')
    def     UpperCamelCase__     (			self) ->			Optional[int]:
        pass







    @unittest.skip('''ESMFold does not support head pruning.''')
    def     UpperCamelCase__     (			self) ->			Optional[Any]:
        pass







    @unittest.skip('''ESMFold does not support head pruning.''')
    def     UpperCamelCase__     (			self) ->			Dict:
        pass







    @unittest.skip('''ESMFold does not support head pruning.''')
    def     UpperCamelCase__     (			self) ->			Optional[Any]:
        pass







    @unittest.skip('''ESMFold does not support head pruning.''')
    def     UpperCamelCase__     (			self) ->			Optional[int]:
        pass







    @unittest.skip('''ESMFold does not output hidden states in the normal way.''')
    def     UpperCamelCase__     (			self) ->			str:
        pass







    @unittest.skip('''ESMfold does not output hidden states in the normal way.''')
    def     UpperCamelCase__     (			self) ->			Optional[Any]:
        pass







    @unittest.skip('''ESMFold only has one output format.''')
    def     UpperCamelCase__     (			self) ->			Union[str, Any]:
        pass







    @unittest.skip('''This test doesn\'t work for ESMFold and doesn\'t test core functionality''')
    def     UpperCamelCase__     (			self) ->			List[Any]:
        pass







    @unittest.skip('''ESMFold does not support input chunking.''')
    def     UpperCamelCase__     (			self) ->			List[Any]:
        pass







    @unittest.skip('''ESMFold doesn\'t respect you and it certainly doesn\'t respect your initialization arguments.''')
    def     UpperCamelCase__     (			self) ->			int:
        pass







    @unittest.skip('''ESMFold doesn\'t support torchscript compilation.''')
    def     UpperCamelCase__     (			self) ->			str:
        pass







    @unittest.skip('''ESMFold doesn\'t support torchscript compilation.''')
    def     UpperCamelCase__     (			self) ->			List[Any]:
        pass







    @unittest.skip('''ESMFold doesn\'t support torchscript compilation.''')
    def     UpperCamelCase__     (			self) ->			List[Any]:
        pass







    @unittest.skip('''ESMFold doesn\'t support data parallel.''')
    def     UpperCamelCase__     (			self) ->			Any:
        pass







    @unittest.skip('''Will be fixed soon by reducing the size of the model used for common tests.''')
    def     UpperCamelCase__     (			self) ->			Dict:
        pass


@require_torch
class 			lowerCamelCase_  (     UpperCAmelCase_				):






    '''simple docstring'''






    @slow
    def     UpperCamelCase__     (			self) ->			Tuple:
        __UpperCamelCase  :Optional[Any]    						=	EsmForProteinFolding.from_pretrained('''facebook/esmfold_v1''').float()
        model.eval()
        __UpperCamelCase  :Tuple    						=	torch.tensor([[0, 6, 4, 13, 5, 4, 16, 12, 11, 7, 2]])
        __UpperCamelCase  :List[Any]    						=	model(__lowercase)['''positions''']
        __UpperCamelCase  :Optional[int]    						=	torch.tensor([2.58_28, 0.79_93, -10.93_34]				,				dtype=torch.floataa)
        self.assertTrue(torch.allclose(position_outputs[0, 0, 0, 0]				,				__lowercase				,				atol=1E-4))





