





import unittest

from transformers import YosoConfig, is_torch_available
from transformers.testing_utils import require_torch, slow, torch_device

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


if is_torch_available():
      import torch

      from transformers import (
          YosoForMaskedLM,
          YosoForMultipleChoice,
          YosoForQuestionAnswering,
          YosoForSequenceClassification,
          YosoForTokenClassification,
          YosoModel,
      )
      from transformers.models.yoso.modeling_yoso import YOSO_PRETRAINED_MODEL_ARCHIVE_LIST



class 				_lowerCAmelCase			:


  '''simple docstring'''







  def __init__(					self					:    Optional[Any]					, UpperCamelCase					:    List[str]					, UpperCamelCase					:    List[str]=13					, UpperCamelCase					:    Union[str, Any]=7					, UpperCamelCase					:    List[str]=True					, UpperCamelCase					:    List[str]=True					, UpperCamelCase					:    Union[str, Any]=True					, UpperCamelCase					:    Dict=True					, UpperCamelCase					:    List[Any]=99					, UpperCamelCase					:    Dict=32					, UpperCamelCase					:    List[str]=5					, UpperCamelCase					:    Tuple=4					, UpperCamelCase					:    Dict=37					, UpperCamelCase					:    Optional[Any]="gelu"					, UpperCamelCase					:    Tuple=0.1					, UpperCamelCase					:    Union[str, Any]=0.1					, UpperCamelCase					:    Optional[Any]=5_12					, UpperCamelCase					:    List[Any]=16					, UpperCamelCase					:    List[Any]=2					, UpperCamelCase					:    Optional[Any]=0.02					, UpperCamelCase					:    Any=3					, UpperCamelCase					:    Tuple=4					, UpperCamelCase					:    List[str]=None					, ):


    '''simple docstring'''





    _snake_case      : Optional[Any]														=		parent
    _snake_case      : str														=		batch_size
    _snake_case      : List[Any]														=		seq_length
    _snake_case      : int														=		is_training
    _snake_case      : Dict														=		use_input_mask
    _snake_case      : int														=		use_token_type_ids
    _snake_case      : Any														=		use_labels
    _snake_case      : Union[str, Any]														=		vocab_size
    _snake_case      : int														=		hidden_size
    _snake_case      : Any														=		num_hidden_layers
    _snake_case      : Dict														=		num_attention_heads
    _snake_case      : Tuple														=		intermediate_size
    _snake_case      : List[str]														=		hidden_act
    _snake_case      : List[str]														=		hidden_dropout_prob
    _snake_case      : Tuple														=		attention_probs_dropout_prob
    _snake_case      : Optional[Any]														=		max_position_embeddings
    _snake_case      : List[Any]														=		type_vocab_size
    _snake_case      : Tuple														=		type_sequence_label_size
    _snake_case      : int														=		initializer_range
    _snake_case      : Dict														=		num_labels
    _snake_case      : Tuple														=		num_choices
    _snake_case      : str														=		scope







  def UpperCamelCase_       (					self					:    List[str]							):


    '''simple docstring'''





    _snake_case      : str														=		ids_tensor([self.batch_size, self.seq_length]					, self.vocab_size							)

    _snake_case      : int														=		None
    if self.use_input_mask:
      _snake_case      : Tuple														=		random_attention_mask([self.batch_size, self.seq_length]							)

    _snake_case      : Any														=		None
    if self.use_token_type_ids:
      _snake_case      : Optional[int]														=		ids_tensor([self.batch_size, self.seq_length]					, self.type_vocab_size							)

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

    _snake_case      : str														=		self.get_config()

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







  def UpperCamelCase_       (					self					:    Any							):


    '''simple docstring'''





    return YosoConfig(
        vocab_size=self.vocab_size					, hidden_size=self.hidden_size					, 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					, is_decoder=UpperCamelCase					, initializer_range=self.initializer_range					, )







  def UpperCamelCase_       (					self					:    Optional[Any]							):


    '''simple docstring'''





    _snake_case      : Tuple														=		self.get_config()
    _snake_case      : List[str]														=		3_00
    return config







  def UpperCamelCase_       (					self					:    Any							):


    '''simple docstring'''





    (
        (
        _snake_case
    )							,    (
        _snake_case
    )							,    (
        _snake_case
    )							,    (
        _snake_case
    )							,    (
        _snake_case
    )							,    (
        _snake_case
    )							,    (
        _snake_case
    )							,    
    )      : List[Any]														=		self.prepare_config_and_inputs()

    _snake_case      : Dict														=		True
    _snake_case      : Union[str, Any]														=		floats_tensor([self.batch_size, self.seq_length, self.hidden_size]							)
    _snake_case      : Tuple														=		ids_tensor([self.batch_size, self.seq_length]					, vocab_size=2							)

    return (
        config,
        input_ids,
        token_type_ids,
        input_mask,
        sequence_labels,
        token_labels,
        choice_labels,
        encoder_hidden_states,
        encoder_attention_mask,
    )







  def UpperCamelCase_       (					self					:    Dict					, UpperCamelCase					:    Optional[int]					, UpperCamelCase					:    Union[str, Any]					, UpperCamelCase					:    str					, UpperCamelCase					:    str					, UpperCamelCase					:    Optional[int]					, UpperCamelCase					:    List[Any]					, UpperCamelCase					:    List[Any]							):


    '''simple docstring'''





    _snake_case      : List[str]														=		YosoModel(config=UpperCamelCase							)
    model.to(UpperCamelCase							)
    model.eval()
    _snake_case      : str														=		model(UpperCamelCase					, attention_mask=UpperCamelCase					, token_type_ids=UpperCamelCase							)
    _snake_case      : Optional[int]														=		model(UpperCamelCase					, token_type_ids=UpperCamelCase							)
    _snake_case      : str														=		model(UpperCamelCase							)
    self.parent.assertEqual(result.last_hidden_state.shape					, (self.batch_size, self.seq_length, self.hidden_size)							)







  def UpperCamelCase_       (					self					:    int					, UpperCamelCase					:    Union[str, Any]					, UpperCamelCase					:    Optional[int]					, UpperCamelCase					:    str					, UpperCamelCase					:    int					, UpperCamelCase					:    List[str]					, UpperCamelCase					:    str					, UpperCamelCase					:    int					, UpperCamelCase					:    int					, UpperCamelCase					:    str					, ):


    '''simple docstring'''





    _snake_case      : Union[str, Any]														=		True
    _snake_case      : Tuple														=		YosoModel(UpperCamelCase							)
    model.to(UpperCamelCase							)
    model.eval()
    _snake_case      : Any														=		model(
        UpperCamelCase					, attention_mask=UpperCamelCase					, token_type_ids=UpperCamelCase					, encoder_hidden_states=UpperCamelCase					, encoder_attention_mask=UpperCamelCase					, )
    _snake_case      : int														=		model(
        UpperCamelCase					, attention_mask=UpperCamelCase					, token_type_ids=UpperCamelCase					, encoder_hidden_states=UpperCamelCase					, )
    _snake_case      : Optional[Any]														=		model(UpperCamelCase					, attention_mask=UpperCamelCase					, token_type_ids=UpperCamelCase							)
    self.parent.assertEqual(result.last_hidden_state.shape					, (self.batch_size, self.seq_length, self.hidden_size)							)







  def UpperCamelCase_       (					self					:    List[str]					, UpperCamelCase					:    List[str]					, UpperCamelCase					:    Union[str, Any]					, UpperCamelCase					:    List[str]					, UpperCamelCase					:    Optional[Any]					, UpperCamelCase					:    Optional[int]					, UpperCamelCase					:    Any					, UpperCamelCase					:    Dict							):


    '''simple docstring'''





    _snake_case      : Tuple														=		YosoForMaskedLM(config=UpperCamelCase							)
    model.to(UpperCamelCase							)
    model.eval()
    _snake_case      : Dict														=		model(UpperCamelCase					, attention_mask=UpperCamelCase					, token_type_ids=UpperCamelCase					, labels=UpperCamelCase							)
    self.parent.assertEqual(result.logits.shape					, (self.batch_size, self.seq_length, self.vocab_size)							)







  def UpperCamelCase_       (					self					:    List[str]					, UpperCamelCase					:    Union[str, Any]					, UpperCamelCase					:    Optional[int]					, UpperCamelCase					:    Union[str, Any]					, UpperCamelCase					:    int					, UpperCamelCase					:    Union[str, Any]					, UpperCamelCase					:    List[str]					, UpperCamelCase					:    int							):


    '''simple docstring'''





    _snake_case      : str														=		YosoForQuestionAnswering(config=UpperCamelCase							)
    model.to(UpperCamelCase							)
    model.eval()
    _snake_case      : Tuple														=		model(
        UpperCamelCase					, attention_mask=UpperCamelCase					, token_type_ids=UpperCamelCase					, start_positions=UpperCamelCase					, end_positions=UpperCamelCase					, )
    self.parent.assertEqual(result.start_logits.shape					, (self.batch_size, self.seq_length)							)
    self.parent.assertEqual(result.end_logits.shape					, (self.batch_size, self.seq_length)							)







  def UpperCamelCase_       (					self					:    Optional[int]					, UpperCamelCase					:    Tuple					, UpperCamelCase					:    Dict					, UpperCamelCase					:    str					, UpperCamelCase					:    List[str]					, UpperCamelCase					:    Tuple					, UpperCamelCase					:    Any					, UpperCamelCase					:    Union[str, Any]							):


    '''simple docstring'''





    _snake_case      : int														=		self.num_labels
    _snake_case      : List[str]														=		YosoForSequenceClassification(UpperCamelCase							)
    model.to(UpperCamelCase							)
    model.eval()
    _snake_case      : str														=		model(UpperCamelCase					, attention_mask=UpperCamelCase					, token_type_ids=UpperCamelCase					, labels=UpperCamelCase							)
    self.parent.assertEqual(result.logits.shape					, (self.batch_size, self.num_labels)							)







  def UpperCamelCase_       (					self					:    int					, UpperCamelCase					:    Any					, UpperCamelCase					:    int					, UpperCamelCase					:    Optional[Any]					, UpperCamelCase					:    Optional[Any]					, UpperCamelCase					:    Union[str, Any]					, UpperCamelCase					:    Optional[int]					, UpperCamelCase					:    List[Any]							):


    '''simple docstring'''





    _snake_case      : Dict														=		self.num_labels
    _snake_case      : Tuple														=		YosoForTokenClassification(config=UpperCamelCase							)
    model.to(UpperCamelCase							)
    model.eval()
    _snake_case      : Union[str, Any]														=		model(UpperCamelCase					, attention_mask=UpperCamelCase					, token_type_ids=UpperCamelCase					, labels=UpperCamelCase							)
    self.parent.assertEqual(result.logits.shape					, (self.batch_size, self.seq_length, self.num_labels)							)







  def UpperCamelCase_       (					self					:    Optional[Any]					, UpperCamelCase					:    int					, UpperCamelCase					:    str					, UpperCamelCase					:    int					, UpperCamelCase					:    Union[str, Any]					, UpperCamelCase					:    Tuple					, UpperCamelCase					:    Dict					, UpperCamelCase					:    Union[str, Any]							):


    '''simple docstring'''





    _snake_case      : Tuple														=		self.num_choices
    _snake_case      : Any														=		YosoForMultipleChoice(config=UpperCamelCase							)
    model.to(UpperCamelCase							)
    model.eval()
    _snake_case      : Dict														=		input_ids.unsqueeze(1							).expand(-1					, self.num_choices					, -1							).contiguous()
    _snake_case      : Any														=		token_type_ids.unsqueeze(1							).expand(-1					, self.num_choices					, -1							).contiguous()
    _snake_case      : int														=		input_mask.unsqueeze(1							).expand(-1					, self.num_choices					, -1							).contiguous()
    _snake_case      : str														=		model(
        UpperCamelCase					, attention_mask=UpperCamelCase					, token_type_ids=UpperCamelCase					, labels=UpperCamelCase					, )
    self.parent.assertEqual(result.logits.shape					, (self.batch_size, self.num_choices)							)







  def UpperCamelCase_       (					self					:    str							):


    '''simple docstring'''





    _snake_case      : Dict														=		self.prepare_config_and_inputs()
    (
        (
        _snake_case
    )							,    (
        _snake_case
    )							,    (
        _snake_case
    )							,    (
        _snake_case
    )							,    (
        _snake_case
    )							,    (
        _snake_case
    )							,    (
        _snake_case
    )							,    
    )      : int														=		config_and_inputs
    _snake_case      : Union[str, Any]														=		{'input_ids': input_ids, 'token_type_ids': token_type_ids, 'attention_mask': input_mask}
    return config, inputs_dict




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


  '''simple docstring'''
  a_							:				Union[str, Any]					    =(
      (
          YosoModel,
          YosoForMaskedLM,
          YosoForMultipleChoice,
          YosoForQuestionAnswering,
          YosoForSequenceClassification,
          YosoForTokenClassification,
      )
      if is_torch_available()
      else ()
  )
  a_							:				Optional[int]					    =False
  a_							:				Dict					    =False
  a_							:				Dict					    =False

  a_							:				str					    =()
  a_							:				str					    =(
      {
          """feature-extraction""": YosoModel,
          """fill-mask""": YosoForMaskedLM,
          """question-answering""": YosoForQuestionAnswering,
          """text-classification""": YosoForSequenceClassification,
          """token-classification""": YosoForTokenClassification,
          """zero-shot""": YosoForSequenceClassification,
      }
      if is_torch_available()
      else {}
  )







  def UpperCamelCase_       (					self					:    int							):


    '''simple docstring'''





    _snake_case      : List[Any]														=		YosoModelTester(self							)
    _snake_case      : str														=		ConfigTester(self					, config_class=UpperCamelCase					, hidden_size=37							)







  def UpperCamelCase_       (					self					:    List[str]							):


    '''simple docstring'''





    self.config_tester.run_common_tests()







  def UpperCamelCase_       (					self					:    int							):


    '''simple docstring'''





    _snake_case      : int														=		self.model_tester.prepare_config_and_inputs()
    self.model_tester.create_and_check_model(*UpperCamelCase							)







  def UpperCamelCase_       (					self					:    Dict							):


    '''simple docstring'''





    _snake_case      : Tuple														=		self.model_tester.prepare_config_and_inputs()
    for type in ["absolute", "relative_key", "relative_key_query"]:
      _snake_case      : Dict														=		type
      self.model_tester.create_and_check_model(*UpperCamelCase							)







  def UpperCamelCase_       (					self					:    List[Any]							):


    '''simple docstring'''





    _snake_case      : str														=		self.model_tester.prepare_config_and_inputs()
    self.model_tester.create_and_check_for_masked_lm(*UpperCamelCase							)







  def UpperCamelCase_       (					self					:    Dict							):


    '''simple docstring'''





    _snake_case      : Any														=		self.model_tester.prepare_config_and_inputs()
    self.model_tester.create_and_check_for_multiple_choice(*UpperCamelCase							)







  def UpperCamelCase_       (					self					:    Optional[int]							):


    '''simple docstring'''





    _snake_case      : Optional[Any]														=		self.model_tester.prepare_config_and_inputs()
    self.model_tester.create_and_check_for_question_answering(*UpperCamelCase							)







  def UpperCamelCase_       (					self					:    Any							):


    '''simple docstring'''





    _snake_case      : Optional[int]														=		self.model_tester.prepare_config_and_inputs()
    self.model_tester.create_and_check_for_sequence_classification(*UpperCamelCase							)







  def UpperCamelCase_       (					self					:    Optional[Any]							):


    '''simple docstring'''





    _snake_case      : str														=		self.model_tester.prepare_config_and_inputs()
    self.model_tester.create_and_check_for_token_classification(*UpperCamelCase							)







  @slow
  def UpperCamelCase_       (					self					:    Dict							):


    '''simple docstring'''





    for model_name in YOSO_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
      _snake_case      : List[Any]														=		YosoModel.from_pretrained(UpperCamelCase							)
      self.assertIsNotNone(UpperCamelCase							)







  def UpperCamelCase_       (					self					:    Union[str, Any]							):


    '''simple docstring'''





    return




@require_torch
class 				_lowerCAmelCase			(	unittest.TestCase							):


  '''simple docstring'''







  @slow
  def UpperCamelCase_       (					self					:    str							):


    '''simple docstring'''





    _snake_case      : Optional[Any]														=		YosoModel.from_pretrained('uw-madison/yoso-4096'							)
    _snake_case      : List[str]														=		torch.tensor([[0, 1, 2, 3, 4, 5]]							)

    with torch.no_grad():
      _snake_case      : Union[str, Any]														=		model(UpperCamelCase							)[0]

    _snake_case      : List[str]														=		torch.Size((1, 6, 7_68)							)
    self.assertEqual(output.shape					, UpperCamelCase							)

    _snake_case      : Dict														=		torch.tensor(
        [[[-0.06_11, 0.12_42, 0.08_40], [0.02_80, -0.00_48, 0.11_25], [0.01_06, 0.02_26, 0.07_51]]]							)

    self.assertTrue(torch.allclose(output[:, :3, :3]					, UpperCamelCase					, atol=1e-4							)							)







  @slow
  def UpperCamelCase_       (					self					:    Optional[int]							):


    '''simple docstring'''





    _snake_case      : Any														=		YosoForMaskedLM.from_pretrained('uw-madison/yoso-4096'							)
    _snake_case      : int														=		torch.tensor([[0, 1, 2, 3, 4, 5]]							)

    with torch.no_grad():
      _snake_case      : Tuple														=		model(UpperCamelCase							)[0]

    _snake_case      : List[str]														=		5_02_65

    _snake_case      : int														=		torch.Size((1, 6, vocab_size)							)
    self.assertEqual(output.shape					, UpperCamelCase							)

    _snake_case      : Optional[Any]														=		torch.tensor(
        [[[-2.13_13, -3.72_85, -2.24_07], [-2.70_47, -3.33_14, -2.64_08], [0.06_29, -2.51_66, -0.33_56]]]							)

    self.assertTrue(torch.allclose(output[:, :3, :3]					, UpperCamelCase					, atol=1e-4							)							)







  @slow
  def UpperCamelCase_       (					self					:    Dict							):


    '''simple docstring'''





    _snake_case      : Optional[Any]														=		YosoForMaskedLM.from_pretrained('uw-madison/yoso-4096'							)
    _snake_case      : Dict														=		torch.arange(40_96							).unsqueeze(0							)

    with torch.no_grad():
      _snake_case      : Optional[Any]														=		model(UpperCamelCase							)[0]

    _snake_case      : Any														=		5_02_65

    _snake_case      : Optional[Any]														=		torch.Size((1, 40_96, vocab_size)							)
    self.assertEqual(output.shape					, UpperCamelCase							)

    _snake_case      : Optional[int]														=		torch.tensor(
        [[[-2.39_14, -4.37_42, -5.09_56], [-4.09_88, -4.23_84, -7.04_06], [-3.14_27, -3.71_92, -6.68_00]]]							)

    self.assertTrue(torch.allclose(output[:, :3, :3]					, UpperCamelCase					, atol=1e-4							)							)











import argparse

import torch

from transformers import MraConfig, MraForMaskedLM


def 			lowerCamelCase_		(					lowerCAmelCase:		Any )->						str:
  if "model" in orig_key:
    _snake_case      : Tuple														=		orig_key.replace('model.'			,							'' )
  if "norm1" in orig_key:
    _snake_case      : List[str]														=		orig_key.replace('norm1'			,							'attention.output.LayerNorm' )
  if "norm2" in orig_key:
    _snake_case      : Tuple														=		orig_key.replace('norm2'			,							'output.LayerNorm' )
  if "norm" in orig_key:
    _snake_case      : Any														=		orig_key.replace('norm'			,							'LayerNorm' )
  if "transformer" in orig_key:
    _snake_case      : Tuple														=		orig_key.split('.' )[0].split('_' )[-1]
    _snake_case      : List[Any]														=		orig_key.replace(F"""transformer_{layer_num}"""			,							F"""encoder.layer.{layer_num}""" )
  if "mha.attn" in orig_key:
    _snake_case      : Union[str, Any]														=		orig_key.replace('mha.attn'			,							'attention.self' )
  if "mha" in orig_key:
    _snake_case      : Dict														=		orig_key.replace('mha'			,							'attention' )
  if "W_q" in orig_key:
    _snake_case      : Optional[Any]														=		orig_key.replace('W_q'			,							'self.query' )
  if "W_k" in orig_key:
    _snake_case      : Union[str, Any]														=		orig_key.replace('W_k'			,							'self.key' )
  if "W_v" in orig_key:
    _snake_case      : Tuple														=		orig_key.replace('W_v'			,							'self.value' )
  if "ff.0" in orig_key:
    _snake_case      : str														=		orig_key.replace('ff.0'			,							'intermediate.dense' )
  if "ff.2" in orig_key:
    _snake_case      : int														=		orig_key.replace('ff.2'			,							'output.dense' )
  if "ff" in orig_key:
    _snake_case      : Tuple														=		orig_key.replace('ff'			,							'output.dense' )
  if "mlm_class" in orig_key:
    _snake_case      : str														=		orig_key.replace('mlm.mlm_class'			,							'cls.predictions.decoder' )
  if "mlm" in orig_key:
    _snake_case      : Dict														=		orig_key.replace('mlm'			,							'cls.predictions.transform' )
  if "backbone.backbone.encoders" in orig_key:
    _snake_case      : Any														=		orig_key.replace('backbone.backbone.encoders'			,							'encoder.layer' )
  if "cls" not in orig_key:
    _snake_case      : Dict														=		'mra.' + orig_key

  return orig_key


def 			lowerCamelCase_		(					lowerCAmelCase:		List[Any]			,							lowerCAmelCase:		Union[str, Any] )->						Any:
  for key in orig_state_dict.copy().keys():
    _snake_case      : Dict														=		orig_state_dict.pop(lowerCAmelCase )

    if ("pooler" in key) or ("sen_class" in key):
      continue
    else:
      _snake_case      : str														=		val

  _snake_case      : Tuple														=		orig_state_dict['cls.predictions.decoder.bias']
  _snake_case      : List[Any]														=		torch.arange(lowerCAmelCase ).expand((1, -1) ) + 2

  return orig_state_dict


def 			lowerCamelCase_		(					lowerCAmelCase:		List[str]			,							lowerCAmelCase:		List[str]			,							lowerCAmelCase:		int )->						List[str]:
  _snake_case      : Optional[Any]														=		torch.load(lowerCAmelCase			,							map_location='cpu' )['model_state_dict']
  _snake_case      : Optional[Any]														=		MraConfig.from_json_file(lowerCAmelCase )
  _snake_case      : Any														=		MraForMaskedLM(lowerCAmelCase )

  _snake_case      : List[Any]														=		convert_checkpoint_helper(config.max_position_embeddings			,							lowerCAmelCase )

  print(model.load_state_dict(lowerCAmelCase ) )
  model.eval()
  model.save_pretrained(lowerCAmelCase )

  print(F"""Checkpoint successfuly converted. Model saved at {pytorch_dump_path}""" )


if __name__ == "__main__":
      lowerCAmelCase_        =			argparse.ArgumentParser()
      # Required parameters
      parser.add_argument(
          """--pytorch_model_path""", default=None, type=str, required=True, help="""Path to Mra pytorch checkpoint."""
      )
      parser.add_argument(
          """--config_file""",
          default=None,
          type=str,
          required=True,
          help="""The json file for Mra model config.""",
      )
      parser.add_argument(
          """--pytorch_dump_path""", default=None, type=str, required=True, help="""Path to the output PyTorch model."""
      )
      lowerCAmelCase_        =			parser.parse_args()
      convert_mra_checkpoint(args.pytorch_model_path, args.config_file, args.pytorch_dump_path)




