






import inspect
import unittest

from transformers import ConvNextConfig
from transformers.testing_utils import require_torch, require_vision, slow, torch_device
from transformers.utils import cached_property, is_torch_available, is_vision_available

from ...test_backbone_common import BackboneTesterMixin
from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, floats_tensor, ids_tensor
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
  import torch

  from transformers import ConvNextBackbone, ConvNextForImageClassification, ConvNextModel
  from transformers.models.convnext.modeling_convnext import CONVNEXT_PRETRAINED_MODEL_ARCHIVE_LIST


if is_vision_available():
  from PIL import Image

  from transformers import AutoImageProcessor
class 		SCREAMING_SNAKE_CASE__	:

  '''simple docstring'''







  def __init__(      self		:			Dict       ,				lowerCamelCase		:			List[str]       ,				lowerCamelCase		:			Optional[Any]=13       ,				lowerCamelCase		:			Dict=32       ,				lowerCamelCase		:			Optional[int]=3       ,				lowerCamelCase		:			List[Any]=4       ,				lowerCamelCase		:			Tuple=[10, 20, 30, 40]       ,				lowerCamelCase		:			str=[2, 2, 3, 2]       ,				lowerCamelCase		:			Optional[int]=True       ,				lowerCamelCase		:			List[Any]=True       ,				lowerCamelCase		:			Union[str, Any]=37       ,				lowerCamelCase		:			Any="gelu"       ,				lowerCamelCase		:			Tuple=10       ,				lowerCamelCase		:			Optional[Any]=0.02       ,				lowerCamelCase		:			Union[str, Any]=["stage2", "stage3", "stage4"]       ,				lowerCamelCase		:			Any=[2, 3, 4]       ,				lowerCamelCase		:			Tuple=None       ,				)						->	int:


         """simple docstring"""
         _UpperCAmelCase							=    parent
         _UpperCAmelCase							=    batch_size
         _UpperCAmelCase							=    image_size
         _UpperCAmelCase							=    num_channels
         _UpperCAmelCase							=    num_stages
         _UpperCAmelCase							=    hidden_sizes
         _UpperCAmelCase							=    depths
         _UpperCAmelCase							=    is_training
         _UpperCAmelCase							=    use_labels
         _UpperCAmelCase							=    intermediate_size
         _UpperCAmelCase							=    hidden_act
         _UpperCAmelCase							=    num_labels
         _UpperCAmelCase							=    initializer_range
         _UpperCAmelCase							=    out_features
         _UpperCAmelCase							=    out_indices
         _UpperCAmelCase							=    scope


  def  lowerCamelCase       (      self		:			Union[str, Any]							)						->	Union[str, Any]:


         """simple docstring"""
         _UpperCAmelCase							=    floats_tensor([self.batch_size, self.num_channels, self.image_size, self.image_size]							)

         _UpperCAmelCase							=    None
         if self.use_labels:
                _UpperCAmelCase							=    ids_tensor([self.batch_size]       ,				self.num_labels							)

         _UpperCAmelCase							=    self.get_config()
         return config, pixel_values, labels


  def  lowerCamelCase       (      self		:			Optional[Any]							)						->	Any:


         """simple docstring"""
         return ConvNextConfig(
             num_channels=self.num_channels       ,				hidden_sizes=self.hidden_sizes       ,				depths=self.depths       ,				num_stages=self.num_stages       ,				hidden_act=self.hidden_act       ,				is_decoder=lowerCamelCase       ,				initializer_range=self.initializer_range       ,				out_features=self.out_features       ,				out_indices=self.out_indices       ,				num_labels=self.num_labels       ,				)


  def  lowerCamelCase       (      self		:			Union[str, Any]       ,				lowerCamelCase		:			List[str]       ,				lowerCamelCase		:			Optional[int]       ,				lowerCamelCase		:			Any							)						->	str:


         """simple docstring"""
         _UpperCAmelCase							=    ConvNextModel(config=lowerCamelCase							)
         model.to(lowerCamelCase							)
         model.eval()
         _UpperCAmelCase							=    model(lowerCamelCase							)
         # expected last hidden states: B, C, H // 32, W // 32
         self.parent.assertEqual(
             result.last_hidden_state.shape       ,				(self.batch_size, self.hidden_sizes[-1], self.image_size // 32, self.image_size // 32)       ,				)


  def  lowerCamelCase       (      self		:			Dict       ,				lowerCamelCase		:			Tuple       ,				lowerCamelCase		:			Tuple       ,				lowerCamelCase		:			List[Any]							)						->	int:


         """simple docstring"""
         _UpperCAmelCase							=    ConvNextForImageClassification(lowerCamelCase							)
         model.to(lowerCamelCase							)
         model.eval()
         _UpperCAmelCase							=    model(lowerCamelCase       ,				labels=lowerCamelCase							)
         self.parent.assertEqual(result.logits.shape       ,				(self.batch_size, self.num_labels)							)


  def  lowerCamelCase       (      self		:			Dict       ,				lowerCamelCase		:			List[Any]       ,				lowerCamelCase		:			Tuple       ,				lowerCamelCase		:			Dict							)						->	Dict:


         """simple docstring"""
         _UpperCAmelCase							=    ConvNextBackbone(config=lowerCamelCase							)
         model.to(lowerCamelCase							)
         model.eval()
         _UpperCAmelCase							=    model(lowerCamelCase							)

         # verify hidden states
         self.parent.assertEqual(len(result.feature_maps							)       ,				len(config.out_features							)							)
         self.parent.assertListEqual(list(result.feature_maps[0].shape							)       ,				[self.batch_size, self.hidden_sizes[1], 4, 4]							)

         # verify channels
         self.parent.assertEqual(len(model.channels							)       ,				len(config.out_features							)							)
         self.parent.assertListEqual(model.channels       ,				config.hidden_sizes[1:]							)

         # verify backbone works with out_features=None
         _UpperCAmelCase							=    None
         _UpperCAmelCase							=    ConvNextBackbone(config=lowerCamelCase							)
         model.to(lowerCamelCase							)
         model.eval()
         _UpperCAmelCase							=    model(lowerCamelCase							)

         # verify feature maps
         self.parent.assertEqual(len(result.feature_maps							)       ,				1							)
         self.parent.assertListEqual(list(result.feature_maps[0].shape							)       ,				[self.batch_size, self.hidden_sizes[-1], 1, 1]							)

         # verify channels
         self.parent.assertEqual(len(model.channels							)       ,				1							)
         self.parent.assertListEqual(model.channels       ,				[config.hidden_sizes[-1]]							)





  def  lowerCamelCase       (      self		:			str							)						->	Union[str, Any]:


         """simple docstring"""
         _UpperCAmelCase							=    self.prepare_config_and_inputs()
         _UpperCAmelCase	,			_UpperCAmelCase	,			_UpperCAmelCase							=    config_and_inputs
         _UpperCAmelCase							=    {"""pixel_values""": pixel_values}
         return config, inputs_dict



@require_torch
class 		SCREAMING_SNAKE_CASE__	(  UpperCAmelCase					,      UpperCAmelCase					,      unittest.TestCase     ):

  '''simple docstring'''







  _lowerCamelCase    =  (
      (
          ConvNextModel,
          ConvNextForImageClassification,
          ConvNextBackbone,
      )
      if is_torch_available()
      else ()
  )
  _lowerCamelCase    =  (
      {'''feature-extraction''': ConvNextModel, '''image-classification''': ConvNextForImageClassification}
      if is_torch_available()
      else {}
  )

  _lowerCamelCase    =  True
  _lowerCamelCase    =  False
  _lowerCamelCase    =  False
  _lowerCamelCase    =  False
  _lowerCamelCase    =  False


  def  lowerCamelCase       (      self		:			Dict							)						->	int:


         """simple docstring"""
         _UpperCAmelCase							=    ConvNextModelTester(self							)
         _UpperCAmelCase							=    ConfigTester(self       ,				config_class=lowerCamelCase       ,				has_text_modality=lowerCamelCase       ,				hidden_size=37							)


  def  lowerCamelCase       (      self		:			int							)						->	int:


         """simple docstring"""
         self.create_and_test_config_common_properties()
         self.config_tester.create_and_test_config_to_json_string()
         self.config_tester.create_and_test_config_to_json_file()
         self.config_tester.create_and_test_config_from_and_save_pretrained()
         self.config_tester.create_and_test_config_with_num_labels()
         self.config_tester.check_config_can_be_init_without_params()
         self.config_tester.check_config_arguments_init()


  def  lowerCamelCase       (      self		:			str							)						->	Union[str, Any]:


         """simple docstring"""
         return


  @unittest.skip(reason="""ConvNext does not use inputs_embeds"""							)
  def  lowerCamelCase       (      self		:			List[Any]							)						->	Any:


         """simple docstring"""
         pass


  @unittest.skip(reason="""ConvNext does not support input and output embeddings"""							)
  def  lowerCamelCase       (      self		:			int							)						->	int:


         """simple docstring"""
         pass


  @unittest.skip(reason="""ConvNext does not use feedforward chunking"""							)
  def  lowerCamelCase       (      self		:			Optional[int]							)						->	int:


         """simple docstring"""
         pass


  def  lowerCamelCase       (      self		:			List[Any]							)						->	Optional[int]:


         """simple docstring"""
         _UpperCAmelCase	,			_UpperCAmelCase							=    self.model_tester.prepare_config_and_inputs_for_common()

         for model_class in self.all_model_classes:
                _UpperCAmelCase							=    model_class(lowerCamelCase							)
                _UpperCAmelCase							=    inspect.signature(model.forward							)
                # signature.parameters is an OrderedDict => so arg_names order is deterministic
                _UpperCAmelCase							=    [*signature.parameters.keys()]

                _UpperCAmelCase							=    ["""pixel_values"""]
                self.assertListEqual(arg_names[:1]       ,				lowerCamelCase							)


  def  lowerCamelCase       (      self		:			Tuple							)						->	Any:


         """simple docstring"""
         _UpperCAmelCase							=    self.model_tester.prepare_config_and_inputs()
         self.model_tester.create_and_check_model(*lowerCamelCase							)


  def  lowerCamelCase       (      self		:			Union[str, Any]							)						->	Optional[Any]:


         """simple docstring"""
         _UpperCAmelCase							=    self.model_tester.prepare_config_and_inputs()
         self.model_tester.create_and_check_backbone(*lowerCamelCase							)


  def  lowerCamelCase       (      self		:			int							)						->	Any:


         """simple docstring"""
         def check_hidden_states_output(lowerCamelCase		:			List[Any]       ,				lowerCamelCase		:			Tuple       ,				lowerCamelCase		:			Optional[int]							):
                _UpperCAmelCase							=    model_class(lowerCamelCase							)
                model.to(lowerCamelCase							)
                model.eval()

                with torch.no_grad():
                       _UpperCAmelCase							=    model(**self._prepare_for_class(lowerCamelCase       ,				lowerCamelCase							)							)

                _UpperCAmelCase							=    outputs.encoder_hidden_states if config.is_encoder_decoder else outputs.hidden_states

                _UpperCAmelCase							=    self.model_tester.num_stages
                self.assertEqual(len(lowerCamelCase							)       ,				expected_num_stages + 1							)

                # ConvNext's feature maps are of shape (batch_size, num_channels, height, width)
                self.assertListEqual(
                    list(hidden_states[0].shape[-2:]							)       ,				[self.model_tester.image_size // 4, self.model_tester.image_size // 4]       ,				)

         _UpperCAmelCase	,			_UpperCAmelCase							=    self.model_tester.prepare_config_and_inputs_for_common()

         for model_class in self.all_model_classes:
                _UpperCAmelCase							=    True
                check_hidden_states_output(lowerCamelCase       ,				lowerCamelCase       ,				lowerCamelCase							)

                # check that output_hidden_states also work using config
                del inputs_dict["output_hidden_states"]
                _UpperCAmelCase							=    True

                check_hidden_states_output(lowerCamelCase       ,				lowerCamelCase       ,				lowerCamelCase							)


  def  lowerCamelCase       (      self		:			Any							)						->	Optional[int]:


         """simple docstring"""
         _UpperCAmelCase							=    self.model_tester.prepare_config_and_inputs()
         self.model_tester.create_and_check_for_image_classification(*lowerCamelCase							)





  @slow
  def  lowerCamelCase       (      self		:			Optional[int]							)						->	List[Any]:


         """simple docstring"""
         for model_name in CONVNEXT_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
                _UpperCAmelCase							=    ConvNextModel.from_pretrained(lowerCamelCase							)
                self.assertIsNotNone(lowerCamelCase							)




def       _SCREAMING_SNAKE_CASE (							)				->						Tuple:
       _UpperCAmelCase							=    Image.open("""./tests/fixtures/tests_samples/COCO/000000039769.png""" )
       return image
@require_torch
@require_vision
class 		SCREAMING_SNAKE_CASE__	(  unittest.TestCase     ):

  '''simple docstring'''







  @cached_property
  def  lowerCamelCase       (      self		:			Dict							)						->	int:


         """simple docstring"""
         return AutoImageProcessor.from_pretrained("""facebook/convnext-tiny-224"""							) if is_vision_available() else None





  @slow
  def  lowerCamelCase       (      self		:			List[Any]							)						->	int:


         """simple docstring"""
         _UpperCAmelCase							=    ConvNextForImageClassification.from_pretrained("""facebook/convnext-tiny-224"""							).to(lowerCamelCase							)

         _UpperCAmelCase							=    self.default_image_processor
         _UpperCAmelCase							=    prepare_img()
         _UpperCAmelCase							=    image_processor(images=lowerCamelCase       ,				return_tensors="""pt"""							).to(lowerCamelCase							)

         # forward pass
         with torch.no_grad():
                _UpperCAmelCase							=    model(**lowerCamelCase							)

         # verify the logits
         _UpperCAmelCase							=    torch.Size((1, 1000)							)
         self.assertEqual(outputs.logits.shape       ,				lowerCamelCase							)

         _UpperCAmelCase							=    torch.tensor([-0.0260, -0.4739, 0.1911]							).to(lowerCamelCase							)

         self.assertTrue(torch.allclose(outputs.logits[0, :3]       ,				lowerCamelCase       ,				atol=1E-4							)							)



@require_torch
class 		SCREAMING_SNAKE_CASE__	(  unittest.TestCase					,      UpperCAmelCase     ):

  '''simple docstring'''







  _lowerCamelCase    =  (ConvNextBackbone,) if is_torch_available() else ()
  _lowerCamelCase    =  ConvNextConfig

  _lowerCamelCase    =  False


  def  lowerCamelCase       (      self		:			List[Any]							)						->	Optional[int]:


         """simple docstring"""
         _UpperCAmelCase							=    ConvNextModelTester(self							)





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     ,		lowerCamelCase__     ,		lowerCamelCase__=13     ,		lowerCamelCase__=7     ,		lowerCamelCase__=False     ,		lowerCamelCase__=True     ,		lowerCamelCase__=False     ,		lowerCamelCase__=False     ,		lowerCamelCase__=19     ,		lowerCamelCase__=32     ,		lowerCamelCase__=5     ,		lowerCamelCase__=4     ,		lowerCamelCase__=37     ,		lowerCamelCase__="gelu"     ,		lowerCamelCase__=0.1     ,		lowerCamelCase__=0.1     ,		lowerCamelCase__=512     ,		lowerCamelCase__=16     ,		lowerCamelCase__=2     ,		lowerCamelCase__=0.02     ,		lowerCamelCase__=3     ,		lowerCamelCase__=4     ,		lowerCamelCase__=None     ,		)       -> Any:



							'''simple docstring'''
							__lowerCamelCase									=       parent
							__lowerCamelCase									=       batch_size
							__lowerCamelCase									=       seq_length
							__lowerCamelCase									=       is_training
							__lowerCamelCase									=       use_input_mask
							__lowerCamelCase									=       use_token_type_ids
							__lowerCamelCase									=       use_labels
							__lowerCamelCase									=       vocab_size
							__lowerCamelCase									=       hidden_size
							__lowerCamelCase									=       num_hidden_layers
							__lowerCamelCase									=       num_attention_heads
							__lowerCamelCase									=       intermediate_size
							__lowerCamelCase									=       hidden_act
							__lowerCamelCase									=       hidden_dropout_prob
							__lowerCamelCase									=       attention_probs_dropout_prob
							__lowerCamelCase									=       max_position_embeddings
							__lowerCamelCase									=       type_vocab_size
							__lowerCamelCase									=       type_sequence_label_size
							__lowerCamelCase									=       initializer_range
							__lowerCamelCase									=       num_labels
							__lowerCamelCase									=       num_choices
							__lowerCamelCase									=       scope


			def  lowercase_       ( self				)       -> str:



							'''simple docstring'''
							__lowerCamelCase									=       ids_tensor([self.batch_size, self.seq_length]     ,		self.vocab_size				)

							__lowerCamelCase									=       None
							if self.use_input_mask:
											__lowerCamelCase									=       random_attention_mask([self.batch_size, self.seq_length]				)

							__lowerCamelCase									=       None
							__lowerCamelCase									=       None
							__lowerCamelCase									=       None
							if self.use_labels:
											__lowerCamelCase									=       ids_tensor([self.batch_size]     ,		self.type_sequence_label_size				)
											__lowerCamelCase									=       ids_tensor([self.batch_size, self.seq_length]     ,		self.num_labels				)
											__lowerCamelCase									=       ids_tensor([self.batch_size]     ,		self.num_choices				)

							__lowerCamelCase									=       self.get_config()

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


			def  lowercase_       ( self				)       -> Tuple:



							'''simple docstring'''
							__lowerCamelCase									=       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=lowerCamelCase__     ,		esmfold_config={'trunk': {'num_blocks': 2}, 'fp16_esm': False}     ,		)
							return config


			def  lowercase_       ( self     ,		lowerCamelCase__     ,		lowerCamelCase__     ,		lowerCamelCase__     ,		lowerCamelCase__     ,		lowerCamelCase__     ,		lowerCamelCase__				)       -> Optional[Any]:



							'''simple docstring'''
							__lowerCamelCase									=       EsmForProteinFolding(config=lowerCamelCase__				).float()
							model.to(lowerCamelCase__				)
							model.eval()
							__lowerCamelCase									=       model(lowerCamelCase__     ,		attention_mask=lowerCamelCase__				)
							__lowerCamelCase									=       model(lowerCamelCase__				)
							__lowerCamelCase									=       model(lowerCamelCase__				)

							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  lowercase_       ( self				)       -> int:



							'''simple docstring'''
							__lowerCamelCase									=       self.prepare_config_and_inputs()
							(
							    (
							    __lowerCamelCase
							)			,		(
							    __lowerCamelCase
							)			,		(
							    __lowerCamelCase
							)			,		(
							    __lowerCamelCase
							)			,		(
							    __lowerCamelCase
							)			,		(
							    __lowerCamelCase
							)			,		
							)									=       config_and_inputs
							__lowerCamelCase									=       {'input_ids': input_ids, 'attention_mask': input_mask}
							return config, inputs_dict







@require_torch
class        __lowerCAmelCase					(			__magic_name__     ,							__magic_name__     ,							unittest.TestCase					):

			"""simple docstring"""







			snake_case_  						=			False

			snake_case_  						=			(EsmForProteinFolding,) if is_torch_available() else ()
			snake_case_  						=			()
			snake_case_  						=			{} if is_torch_available() else {}
			snake_case_  						=			False


			def  lowercase_       ( self				)       -> Tuple:



							'''simple docstring'''
							__lowerCamelCase									=       EsmFoldModelTester(self				)
							__lowerCamelCase									=       ConfigTester(self     ,		config_class=lowerCamelCase__     ,		hidden_size=37				)


			def  lowercase_       ( self				)       -> Any:



							'''simple docstring'''
							self.config_tester.run_common_tests()


			def  lowercase_       ( self				)       -> str:



							'''simple docstring'''
							__lowerCamelCase									=       self.model_tester.prepare_config_and_inputs()
							self.model_tester.create_and_check_model(*lowerCamelCase__				)


			@unittest.skip('Does not support attention outputs'				)
			def  lowercase_       ( self				)       -> int:



							'''simple docstring'''
							pass


			@unittest.skip
			def  lowercase_       ( self				)       -> Tuple:



							'''simple docstring'''
							pass


			@unittest.skip('Esm does not support embedding resizing'				)
			def  lowercase_       ( self				)       -> Any:



							'''simple docstring'''
							pass


			@unittest.skip('Esm does not support embedding resizing'				)
			def  lowercase_       ( self				)       -> int:



							'''simple docstring'''
							pass


			@unittest.skip('ESMFold does not support passing input embeds!'				)
			def  lowercase_       ( self				)       -> Any:



							'''simple docstring'''
							pass


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



							'''simple docstring'''
							pass


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



							'''simple docstring'''
							pass


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



							'''simple docstring'''
							pass


			@unittest.skip('ESMFold does not support head pruning.'				)
			def  lowercase_       ( self				)       -> int:



							'''simple docstring'''
							pass


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



							'''simple docstring'''
							pass


			@unittest.skip('ESMFold does not output hidden states in the normal way.'				)
			def  lowercase_       ( self				)       -> List[str]:



							'''simple docstring'''
							pass


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



							'''simple docstring'''
							pass


			@unittest.skip('ESMFold only has one output format.'				)
			def  lowercase_       ( self				)       -> Tuple:



							'''simple docstring'''
							pass


			@unittest.skip('This test doesn\'t work for ESMFold and doesn\'t test core functionality'				)
			def  lowercase_       ( self				)       -> int:



							'''simple docstring'''
							pass


			@unittest.skip('ESMFold does not support input chunking.'				)
			def  lowercase_       ( self				)       -> Dict:



							'''simple docstring'''
							pass


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



							'''simple docstring'''
							pass


			@unittest.skip('ESMFold doesn\'t support torchscript compilation.'				)
			def  lowercase_       ( self				)       -> Union[str, Any]:



							'''simple docstring'''
							pass


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



							'''simple docstring'''
							pass


			@unittest.skip('ESMFold doesn\'t support torchscript compilation.'				)
			def  lowercase_       ( self				)       -> Dict:



							'''simple docstring'''
							pass


			@unittest.skip('ESMFold doesn\'t support data parallel.'				)
			def  lowercase_       ( self				)       -> str:



							'''simple docstring'''
							pass






			@unittest.skip('Will be fixed soon by reducing the size of the model used for common tests.'				)
			def  lowercase_       ( self				)       -> List[Any]:



							'''simple docstring'''
							pass







@require_torch
class        __lowerCAmelCase					(			__magic_name__					):

			"""simple docstring"""







			@slow
			def  lowercase_       ( self				)       -> str:



							'''simple docstring'''
							__lowerCamelCase									=       EsmForProteinFolding.from_pretrained('facebook/esmfold_v1'				).float()
							model.eval()
							__lowerCamelCase									=       torch.tensor([[0, 6, 4, 13, 5, 4, 16, 12, 11, 7, 2]]				)
							__lowerCamelCase									=       model(lowerCamelCase__				)['positions']
							__lowerCamelCase									=       torch.tensor([2.58_28, 0.79_93, -10.93_34]     ,		dtype=torch.floataa				)
							self.assertTrue(torch.allclose(position_outputs[0, 0, 0, 0]     ,		lowerCamelCase__     ,		atol=1e-4				)				)


