

'''simple docstring'''

import argparse

from transformers import ConvBertConfig, ConvBertModel, TFConvBertModel, load_tf_weights_in_convbert
from transformers.utils import logging


logging.set_verbosity_info()





def 				A_					(	snake_case ,    snake_case ,    snake_case	):
  SCREAMING_SNAKE_CASE:Dict   =   ConvBertConfig.from_json_file(snake_case	)
  SCREAMING_SNAKE_CASE:List[Any]   =   ConvBertModel(snake_case	)

  SCREAMING_SNAKE_CASE:List[str]   =   load_tf_weights_in_convbert(snake_case ,    snake_case ,    snake_case	)
  model.save_pretrained(snake_case	)

  SCREAMING_SNAKE_CASE:Optional[int]   =   TFConvBertModel.from_pretrained(snake_case ,    from_pt=snake_case	)
  tf_model.save_pretrained(snake_case	)


if __name__ == "__main__":
    A_      =							argparse.ArgumentParser()
    # Required parameters
    parser.add_argument(
        "--tf_checkpoint_path", default=None, type=str, required=True, help="Path to the TensorFlow checkpoint path."
    )
    parser.add_argument(
        "--convbert_config_file",
        default=None,
        type=str,
        required=True,
        help=(
            "The config json file corresponding to the pre-trained ConvBERT model. \n"
            "This specifies the model architecture."
        ),
    )
    parser.add_argument(
        "--pytorch_dump_path", default=None, type=str, required=True, help="Path to the output PyTorch model."
    )
    A_      =							parser.parse_args()
    convert_orig_tfa_checkpoint_to_pytorch(args.tf_checkpoint_path, args.convbert_config_file, args.pytorch_dump_path)









'''simple docstring'''

from __future__ import annotations

from collections import Counter





def 				A_					(	snake_case	):
  SCREAMING_SNAKE_CASE:int   =   [True] * n
  SCREAMING_SNAKE_CASE:List[str]   =   False
  SCREAMING_SNAKE_CASE:Tuple   =   False
  SCREAMING_SNAKE_CASE:int   =   True

  for i in range(3 ,    int(n**0.5 + 1	) ,    2	):
    SCREAMING_SNAKE_CASE:str   =   i * 2
    while index < n:
      SCREAMING_SNAKE_CASE:Any   =   False
      SCREAMING_SNAKE_CASE:List[Any]   =   index + i

  SCREAMING_SNAKE_CASE:Union[str, Any]   =   [2]

  for i in range(3 ,    snake_case ,    2	):
    if is_prime[i]:
      primes.append(snake_case	)

  return primes





def 				A_					(	snake_case	):
  SCREAMING_SNAKE_CASE:List[str]   =   str(snake_case	)
  SCREAMING_SNAKE_CASE:Union[str, Any]   =   []
  SCREAMING_SNAKE_CASE:List[str]   =   ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]

  for duplicate in Counter(snake_case	) - Counter(set(snake_case	)	):
    SCREAMING_SNAKE_CASE:List[str]   =   [int(number_str.replace(snake_case ,    snake_case	)	) for digit in digits]
    replacements.append(snake_case	)

  return replacements





def 				A_					(	snake_case = 8	):
  SCREAMING_SNAKE_CASE:str   =   set()

  # Filter primes with less than 3 replaceable digits
  SCREAMING_SNAKE_CASE:Tuple   =   {
      x for x in set(prime_sieve(1000000	)	) if len(str(snake_case	)	) - len(set(str(snake_case	)	)	) >= 3
  }

  for prime in primes:
    if prime in numbers_checked:
      continue

    SCREAMING_SNAKE_CASE:List[Any]   =   digit_replacements(snake_case	)

    for family in replacements:
      numbers_checked.update(snake_case	)
      SCREAMING_SNAKE_CASE:Optional[Any]   =   primes.intersection(snake_case	)

      if len(snake_case	) != family_length:
        continue

      return min(snake_case	)

  return -1


if __name__ == "__main__":
    print(solution())






