





import collections
import json
import os
import re
from typing import TYPE_CHECKING, List, Optional, Tuple

import numpy as np

from ...tokenization_utils_fast import PreTrainedTokenizer
from ...utils import logging


if TYPE_CHECKING:
       from transformers.pipelines.conversational import Conversation


_A					:    Dict   =  logging.get_logger(__name__)

_A					:    Any   =  {'vocab_file': 'vocab.txt', 'emoji_file': 'emoji.json'}

_A					:    str   =  {
    'vocab_file': {
        'abeja/gpt-neox-japanese-2.7b': 'https://huggingface.co/abeja/gpt-neox-japanese-2.7b/resolve/main/vocab.txt',
    },
    'emoji_file': {
        'abeja/gpt-neox-japanese-2.7b': 'https://huggingface.co/abeja/gpt-neox-japanese-2.7b/resolve/main/emoji.json',
    },
}

_A					:    Tuple   =  {
    'abeja/gpt-neox-japanese-2.7b': 20_48,
}



def        _a						(    UpperCAmelCase			,  UpperCAmelCase     )				->				Optional[Any]:







   """simple docstring"""





   with open(SCREAMING_SNAKE_CASE_			,  '''r'''			,  encoding='''utf-8'''     ) as f:
      lowerCamelCase__   :						Tuple					   =							json.loads(f.read()     )

   lowerCamelCase__   :						Dict					   =							collections.OrderedDict()
   lowerCamelCase__   :						List[str]					   =							collections.OrderedDict()
   lowerCamelCase__   :						List[str]					   =							collections.OrderedDict()
   with open(SCREAMING_SNAKE_CASE_			,  '''r'''			,  encoding='''utf-8'''     ) as f:
      lowerCamelCase__   :						Optional[Any]					   =							f.readlines()
   lowerCamelCase__   :						List[Any]					   =							[[t.rstrip('''\n'''     )] if (t == ',' or ',' not in t) else t.rstrip('''\n'''     ).split(''','''     ) for t in token]
   for idx, b in enumerate(SCREAMING_SNAKE_CASE_     ):
      lowerCamelCase__   :						Dict					   =							b
      lowerCamelCase__   :						str					   =							idx
      for wd in b:
         lowerCamelCase__   :						Optional[int]					   =							idx

   return vocab, raw_vocab, ids_to_tokens, emoji


class    __SCREAMING_SNAKE_CASE			( __snake_case					):
       _UpperCAmelCase      :  Tuple     =    VOCAB_FILES_NAMES
       _UpperCAmelCase      :  Tuple     =    PRETRAINED_VOCAB_FILES_MAP
       _UpperCAmelCase      :  Tuple     =    PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
       _UpperCAmelCase      :  List[Any]     =    ["""input_ids""", """attention_mask"""]







       def __init__(      self     :	Dict		,					A     :	Optional[int]		,					A     :	Any		,					A     :	Tuple="<|endoftext|>"		,					A     :	List[str]="<|endoftext|>"		,					A     :	List[Any]="<|startoftext|>"		,					A     :	Optional[int]="<|endoftext|>"		,					A     :	List[Any]=False		,					**A     :	Optional[int]		,					)   ->Union[str, Any]:
          super().__init__(
              unk_token=A		,					pad_token=A		,					bos_token=A		,					eos_token=A		,					do_clean_text=A		,					**A		,					)
          if not os.path.isfile(A			):
             raise ValueError(
                 F"Can't find a vocabulary file at path '{vocab_file}'. To load the vocabulary from a Google pretrained"
                 ''' model use `tokenizer = GPTNeoXJapaneseokenizer.from_pretrained(PRETRAINED_MODEL_NAME)`'''			)
          if not os.path.isfile(A			):
             raise ValueError(
                 F"Can't find a emoji file at path '{emoji_file}'. To load the emoji information from a Google"
                 ''' pretrained model use `tokenizer = GPTNeoXJapaneseokenizer.from_pretrained(PRETRAINED_MODEL_NAME)`'''			)
          lowerCamelCase__   :						str					   =							do_clean_text
          lowerCamelCase__   :						Tuple					   =							load_vocab_and_emoji(A		,					A			)
          lowerCamelCase__   :						Dict					   =							SubWordJapaneseTokenizer(
              vocab=self.vocab		,					ids_to_tokens=self.ids_to_tokens		,					emoji=self.emoji			)







       @property
       def 						__lowerCamelCase    (      self     :	Any			)   ->Optional[int]:
          # self.vocab contains support for character fluctuation unique to Japanese, and has a large number of vocab
          return len(self.raw_vocab			)







       def 						__lowerCamelCase    (      self     :	List[Any]			)   ->Optional[int]:
          return dict(self.raw_vocab		,					**self.added_tokens_encoder			)







       def 						__lowerCamelCase    (      self     :	Any		,					A     :	Any			)   ->Optional[int]:
          return self.subword_tokenizer.tokenize(A		,					clean=self.do_clean_text			)







       def 						__lowerCamelCase    (      self     :	int		,					A     :	str			)   ->List[str]:
          return self.vocab.get(A		,					self.vocab.get(self.unk_token			)			)







       def 						__lowerCamelCase    (      self     :	Dict		,					A     :	Optional[Any]			)   ->Any:
          return self.subword_tokenizer.convert_id_to_token(A			)







       def 						__lowerCamelCase    (      self     :	Optional[Any]		,					A     :	List[Any]			)   ->str:
          lowerCamelCase__   :						int					   =							''.join(A			).strip()
          return out_string







       def 						__lowerCamelCase    (      self     :	List[str]		,					A     :	List[str]			)   ->List[Any]:
          lowerCamelCase__   :						Union[str, Any]					   =							[]
          for is_user, text in conversation.iter_texts():
             input_ids.extend(self.encode(A		,					add_special_tokens=A			) + [self.eos_token_id]			)

          if len(A			) > self.model_max_length:
             lowerCamelCase__   :						Tuple					   =							input_ids[-self.model_max_length :]
          return input_ids







       def 						__lowerCamelCase    (      self     :	Tuple		,					A     :	Any		,					A     :	Dict = None			)   ->str:
          lowerCamelCase__   :						Optional[int]					   =							0
          if os.path.isdir(A			):
             lowerCamelCase__   :						str					   =							os.path.join(
                 A		,					(filename_prefix + '''-''' if filename_prefix else '''''') + VOCAB_FILES_NAMES['''vocab_file''']			)
             lowerCamelCase__   :						Optional[Any]					   =							os.path.join(
                 A		,					(filename_prefix + '''-''' if filename_prefix else '''''') + VOCAB_FILES_NAMES['''emoji_file''']			)
          else:
             lowerCamelCase__   :						Union[str, Any]					   =							(
                 (filename_prefix + '-' if filename_prefix else '') + save_directory + VOCAB_FILES_NAMES['vocab_file']
             )
             lowerCamelCase__   :						str					   =							(
                 (filename_prefix + '-' if filename_prefix else '') + save_directory + VOCAB_FILES_NAMES['emoji_file']
             )
          with open(A		,					'''w'''		,					encoding='''utf-8'''			) as writer:
             for token_index, token in self.ids_to_tokens.items():
                if index != token_index:
                   logger.warning(
                       F"Saving vocabulary to {vocab_file}: vocabulary indices are not consecutive."
                       ''' Please check that the vocabulary is not corrupted!'''			)
                   lowerCamelCase__   :						Union[str, Any]					   =							token_index
                writer.write(''','''.join(A			) + '''\n'''			)
                index += 1
          with open(A		,					'''w'''		,					encoding='''utf-8'''			) as writer:
             json.dump(self.emoji		,					A			)
          return vocab_file, emoji_file


class    __SCREAMING_SNAKE_CASE			( __snake_case					):







       def __init__(      self     :	Tuple		,					A     :	Optional[Any]		,					A     :	Tuple		,					A     :	Tuple			)   ->Dict:
          lowerCamelCase__   :						Union[str, Any]					   =							vocab  # same as swe
          lowerCamelCase__   :						str					   =							ids_to_tokens  # same as bpe
          lowerCamelCase__   :						int					   =							emoji
          lowerCamelCase__   :						Any					   =							np.max([len(A			) for w in self.vocab.keys()]			)
          lowerCamelCase__   :						int					   =							re.compile(R'''(https?|ftp)(:\/\/[-_\.!~*\'()a-zA-Z0-9;\/?:\@&=\+$,%#]+)'''			)
          lowerCamelCase__   :						Tuple					   =							re.compile(R'''[A-Za-z0-9\._+]*@[\-_0-9A-Za-z]+(\.[A-Za-z]+)*'''			)
          lowerCamelCase__   :						str					   =							re.compile(R'''[\(]{0,1}[0-9]{2,4}[\)\-\(]{0,1}[0-9]{2,4}[\)\-]{0,1}[0-9]{3,4}'''			)
          lowerCamelCase__   :						Dict					   =							re.compile(
              R'''([12]\d{3}[/\-年])*(0?[1-9]|1[0-2])[/\-月]((0?[1-9]|[12][0-9]|3[01])日?)*(\d{1,2}|:|\d{1,2}時|\d{1,2}分|\(日\)|\(月\)|\(火\)|\(水\)|\(木\)|\(金\)|\(土\)|㈰|㈪|㈫|㈬|㈭|㈮|㈯)*'''			)
          lowerCamelCase__   :						Dict					   =							re.compile(
              R'''(明治|大正|昭和|平成|令和|㍾|㍽|㍼|㍻|\u32ff)\d{1,2}年(0?[1-9]|1[0-2])月(0?[1-9]|[12][0-9]|3[01])日(\d{1,2}|:|\d{1,2}時|\d{1,2}分|\(日\)|\(月\)|\(火\)|\(水\)|\(木\)|\(金\)|\(土\)|㈰|㈪|㈫|㈬|㈭|㈮|㈯)*'''			)
          lowerCamelCase__   :						Union[str, Any]					   =							re.compile(
              R'''((0|[1-9]\d*|[1-9]\d{0,2}(,\d{3})+)*億)*((0|[1-9]\d*|[1-9]\d{0,2}(,\d{3})+)*万)*((0|[1-9]\d*|[1-9]\d{0,2}(,\d{3})+)*千)*(0|[1-9]\d*|[1-9]\d{0,2}(,\d{3})+)*(千円|万円|千万円|円|千ドル|万ドル|千万ドル|ドル|千ユーロ|万ユーロ|千万ユーロ|ユーロ)+(\(税込\)|\(税抜\)|\+tax)*'''			)
          lowerCamelCase__   :						Optional[Any]					   =							'─━│┃┄┅┆┇┈┉┊┋┌┍┎┏┐┑┒┓└┕┖┗┘┙┚┛├┝┞┟┠┡┢┣┤┥┦┧┨┩┪┫┬┭┮┯┰┱┲┳┴┵┶┷┸┹┺┻┼┽┾┿╀╁╂╃╄╅╆╇╈╉╊╋╌╍╎╏═║╒╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡╢╣╤╥╦╧╨╩╪╫╬╭╮╯╰╱╲╳╴╵╶╷╸╹╺╻╼╽╾╿'
          lowerCamelCase__   :						List[Any]					   =							'▀▁▂▃▄▅▆▇█▉▊▋▌▍▎▏▐░▒▓▔▕▖▗▘▙▚▛▜▝▞▟'
          lowerCamelCase__   :						Dict					   =							str.maketrans({k: '''<BLOCK>''' for k in keisen + blocks}			)







       def __len__(      self     :	Dict			)   ->int:
          return len(self.ids_to_tokens			)







       def 						__lowerCamelCase    (      self     :	Optional[int]		,					A     :	Tuple			)   ->Optional[int]:
          lowerCamelCase__   :						Optional[Any]					   =							self.content_repattera.sub('''<URL>'''		,					A			)
          lowerCamelCase__   :						List[str]					   =							self.content_repattera.sub('''<EMAIL>'''		,					A			)
          lowerCamelCase__   :						List[Any]					   =							self.content_repattera.sub('''<TEL>'''		,					A			)
          lowerCamelCase__   :						Optional[Any]					   =							self.content_repattera.sub('''<DATE>'''		,					A			)
          lowerCamelCase__   :						Optional[int]					   =							self.content_repattera.sub('''<DATE>'''		,					A			)
          lowerCamelCase__   :						Dict					   =							self.content_repattera.sub('''<PRICE>'''		,					A			)
          lowerCamelCase__   :						List[str]					   =							content.translate(self.content_transa			)
          while "<BLOCK><BLOCK>" in content:
             lowerCamelCase__   :						Optional[Any]					   =							content.replace('''<BLOCK><BLOCK>'''		,					'''<BLOCK>'''			)
          return content







       def 						__lowerCamelCase    (      self     :	List[Any]		,					A     :	List[str]		,					A     :	str=False			)   ->str:
          lowerCamelCase__   :						str					   =							text.replace(''' '''		,					'''<SP>'''			)
          lowerCamelCase__   :						Any					   =							text.replace('''　'''		,					'''<SP>'''			)
          lowerCamelCase__   :						List[str]					   =							text.replace('''\r\n'''		,					'''<BR>'''			)
          lowerCamelCase__   :						List[Any]					   =							text.replace('''\n'''		,					'''<BR>'''			)
          lowerCamelCase__   :						List[str]					   =							text.replace('''\r'''		,					'''<BR>'''			)
          lowerCamelCase__   :						int					   =							text.replace('''\t'''		,					'''<TAB>'''			)
          lowerCamelCase__   :						List[Any]					   =							text.replace('''—'''		,					'''ー'''			)
          lowerCamelCase__   :						Union[str, Any]					   =							text.replace('''−'''		,					'''ー'''			)
          for k, v in self.emoji["emoji"].items():
             if k in text:
                lowerCamelCase__   :						Optional[Any]					   =							text.replace(A		,					A			)
          if clean:
             lowerCamelCase__   :						Tuple					   =							self.clean_text(A			)

          def check_simbol(A     :	Any			):
             lowerCamelCase__   :						Dict					   =							x.encode()
             if len(A			) == 1 and len(A			) == 2:
                lowerCamelCase__   :						Union[str, Any]					   =							(int(e[0]			) << 8) + int(e[1]			)
                if (
                    (c >= 0xC_2_A_1 and c <= 0xC_2_B_F)
                    or (c >= 0xC_7_8_0 and c <= 0xC_7_8_3)
                    or (c >= 0xC_A_B_9 and c <= 0xC_B_B_F)
                    or (c >= 0xC_C_8_0 and c <= 0xC_D_A_2)
                ):
                   return True
             return False

          def checkuae(A     :	Dict			):
             lowerCamelCase__   :						Dict					   =							x.encode()
             if len(A			) == 1 and len(A			) == 3:
                lowerCamelCase__   :						str					   =							(int(e[0]			) << 1_6) + (int(e[1]			) << 8) + int(e[2]			)
                if c >= 0xE_2_8_0_8_0 and c <= 0xE_2_B_0_7_F:
                   return True
             return False

          lowerCamelCase__   :						Optional[Any]					   =							0
          lowerCamelCase__   :						Union[str, Any]					   =							[]
          while pos < len(A			):
             lowerCamelCase__   :						str					   =							min(len(A			)		,					pos + self.maxlen + 1			) if text[pos] == '<' else pos + 3
             lowerCamelCase__   :						Any					   =							[]  # (token_id, token, pos)
             for e in range(A		,					A		,					-1			):
                lowerCamelCase__   :						Optional[Any]					   =							text[pos:e]
                if wd in self.vocab:
                   if wd[0] == "<" and len(A			) > 2:
                      lowerCamelCase__   :						Dict					   =							[(self.vocab[wd], wd, e)]
                      break
                   else:
                      candidates.append((self.vocab[wd], wd, e)			)
             if len(A			) > 0:
                # the smallest token_id is adopted
                lowerCamelCase__   :						str					   =							sorted(A		,					key=lambda A			: x[0]			)[0]
                result.append(A			)
                lowerCamelCase__   :						str					   =							e
             else:
                lowerCamelCase__   :						str					   =							pos + 1
                lowerCamelCase__   :						Union[str, Any]					   =							text[pos:end]
                if check_simbol(A			):
                   result.append('''<KIGOU>'''			)
                elif checkuae(A			):
                   result.append('''<U2000U2BFF>'''			)
                else:
                   for i in wd.encode('''utf-8'''			):
                      result.append('''<|byte%d|>''' % i			)
                lowerCamelCase__   :						str					   =							end
          return result







       def 						__lowerCamelCase    (      self     :	int		,					A     :	Tuple		,					A     :	List[Any]="\n"			)   ->Optional[int]:
          lowerCamelCase__   :						Union[str, Any]					   =							[]
          lowerCamelCase__   :						List[Any]					   =							[]
          lowerCamelCase__   :						Any					   =							self.ids_to_tokens[index][0]
          if word[:6] == "<|byte" and word[-2:] == "|>":
             byte_tokens.append(int(word[6:-2]			)			)
          else:
             if len(A			) > 0:
                words.append(bytearray(A			).decode('''utf-8'''		,					errors='''replace'''			)			)
                lowerCamelCase__   :						Optional[int]					   =							[]
             if word[:7] == "<|emoji" and word[-2:] == "|>":
                words.append(self.emoji['''emoji_inv'''][word]			)
             elif word == "<SP>":
                words.append(''' '''			)
             elif word == "<BR>":
                words.append(A			)
             elif word == "<TAB>":
                words.append('''\t'''			)
             elif word == "<BLOCK>":
                words.append('''▀'''			)
             elif word == "<KIGOU>":
                words.append('''ǀ'''			)
             elif word == "<U2000U2BFF>":
                words.append('''‖'''			)
             else:
                words.append(A			)
          if len(A			) > 0:
             words.append(bytearray(A			).decode('''utf-8'''		,					errors='''replace'''			)			)
          lowerCamelCase__   :						str					   =							''.join(A			)
          return text






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       SCREAMING_SNAKE_CASE__					:





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





    def       snake_case_				(      self):
         lowercase__    :   List[Any]      =       ids_tensor([self.batch_size, self.seq_length]						,   self.vocab_size)

         lowercase__    :   List[Any]      =       None
         if self.use_input_mask:
              lowercase__    :   Union[str, Any]      =       random_attention_mask([self.batch_size, self.seq_length])

         lowercase__    :   int      =       None
         lowercase__    :   Optional[int]      =       None
         lowercase__    :   Optional[int]      =       None
         if self.use_labels:
              lowercase__    :   Optional[int]      =       ids_tensor([self.batch_size]						,   self.type_sequence_label_size)
              lowercase__    :   str      =       ids_tensor([self.batch_size, self.seq_length]						,   self.num_labels)
              lowercase__    :   str      =       ids_tensor([self.batch_size]						,   self.num_choices)

         lowercase__    :   int      =       self.get_config()

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





    def       snake_case_				(      self):
         lowercase__    :   str      =       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=a						,   esmfold_config={'trunk': {'num_blocks': 2}, 'fp16_esm': False}						,   )
         return config





    def       snake_case_				(      self						,   a						,   a						,   a						,   a						,   a						,   a):
         lowercase__    :   Dict      =       EsmForProteinFolding(config=a).float()
         model.to(a)
         model.eval()
         lowercase__    :   Union[str, Any]      =       model(a						,   attention_mask=a)
         lowercase__    :   Dict      =       model(a)
         lowercase__    :   int      =       model(a)

         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       snake_case_				(      self):
         lowercase__    :   List[str]      =       self.prepare_config_and_inputs()
         (
             (
             lowercase__
         )      , (
             lowercase__
         )      , (
             lowercase__
         )      , (
             lowercase__
         )      , (
             lowercase__
         )      , (
             lowercase__
         )      , 
         )    :   int      =       config_and_inputs
         lowercase__    :   Optional[int]      =       {'input_ids': input_ids, 'attention_mask': input_mask}
         return config, inputs_dict



@require_torch
class       SCREAMING_SNAKE_CASE__					(__snake_case		,       __snake_case		,       unittest.TestCase     ):
    __lowerCamelCase						:       Dict														=     False

    __lowerCamelCase						:       Dict														=     (EsmForProteinFolding,) if is_torch_available() else ()
    __lowerCamelCase						:       Union[str, Any]														=     ()
    __lowerCamelCase						:       List[Any]														=     {} if is_torch_available() else {}
    __lowerCamelCase						:       Optional[Any]														=     False





    def       snake_case_				(      self):
         lowercase__    :   Tuple      =       EsmFoldModelTester(self)
         lowercase__    :   List[Any]      =       ConfigTester(self						,   config_class=a						,   hidden_size=37)





    def       snake_case_				(      self):
         self.config_tester.run_common_tests()





    def       snake_case_				(      self):
         lowercase__    :   Optional[int]      =       self.model_tester.prepare_config_and_inputs()
         self.model_tester.create_and_check_model(*a)





    @unittest.skip('Does not support attention outputs')
    def       snake_case_				(      self):
         pass





    @unittest.skip
    def       snake_case_				(      self):
         pass





    @unittest.skip('Esm does not support embedding resizing')
    def       snake_case_				(      self):
         pass





    @unittest.skip('Esm does not support embedding resizing')
    def       snake_case_				(      self):
         pass





    @unittest.skip('ESMFold does not support passing input embeds!')
    def       snake_case_				(      self):
         pass





    @unittest.skip('ESMFold does not support head pruning.')
    def       snake_case_				(      self):
         pass





    @unittest.skip('ESMFold does not support head pruning.')
    def       snake_case_				(      self):
         pass





    @unittest.skip('ESMFold does not support head pruning.')
    def       snake_case_				(      self):
         pass





    @unittest.skip('ESMFold does not support head pruning.')
    def       snake_case_				(      self):
         pass





    @unittest.skip('ESMFold does not support head pruning.')
    def       snake_case_				(      self):
         pass





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





    @unittest.skip('ESMfold does not output hidden states in the normal way.')
    def       snake_case_				(      self):
         pass





    @unittest.skip('ESMFold only has one output format.')
    def       snake_case_				(      self):
         pass





    @unittest.skip('This test doesn\'t work for ESMFold and doesn\'t test core functionality')
    def       snake_case_				(      self):
         pass





    @unittest.skip('ESMFold does not support input chunking.')
    def       snake_case_				(      self):
         pass





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





    @unittest.skip('ESMFold doesn\'t support torchscript compilation.')
    def       snake_case_				(      self):
         pass





    @unittest.skip('ESMFold doesn\'t support torchscript compilation.')
    def       snake_case_				(      self):
         pass





    @unittest.skip('ESMFold doesn\'t support torchscript compilation.')
    def       snake_case_				(      self):
         pass





    @unittest.skip('ESMFold doesn\'t support data parallel.')
    def       snake_case_				(      self):
         pass





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



@require_torch
class       SCREAMING_SNAKE_CASE__					(__snake_case     ):





    @slow
    def       snake_case_				(      self):
         lowercase__    :   Dict      =       EsmForProteinFolding.from_pretrained('facebook/esmfold_v1').float()
         model.eval()
         lowercase__    :   Optional[Any]      =       torch.tensor([[0, 6, 4, 13, 5, 4, 16, 12, 11, 7, 2]])
         lowercase__    :   Optional[int]      =       model(a)['positions']
         lowercase__    :   Dict      =       torch.tensor([2.5_828, 0.7_993, -10.9_334]						,   dtype=torch.floataa)
         self.assertTrue(torch.allclose(position_outputs[0, 0, 0, 0]						,   a						,   atol=1e-4))

