





'''simple docstring'''




from __future__ import annotations

import unittest

from transformers import is_tf_available, is_torch_available
from transformers.testing_utils import DUMMY_UNKNOWN_IDENTIFIER, SMALL_MODEL_IDENTIFIER, is_pt_tf_cross_test, slow


if is_tf_available():
  from transformers import (
      AutoConfig,
      BertConfig,
      GPTaConfig,
      TaConfig,
      TFAutoModel,
      TFAutoModelForCausalLM,
      TFAutoModelForMaskedLM,
      TFAutoModelForPreTraining,
      TFAutoModelForQuestionAnswering,
      TFAutoModelForSeqaSeqLM,
      TFAutoModelForSequenceClassification,
      TFAutoModelWithLMHead,
      TFBertForMaskedLM,
      TFBertForPreTraining,
      TFBertForQuestionAnswering,
      TFBertForSequenceClassification,
      TFBertModel,
      TFGPTaLMHeadModel,
      TFRobertaForMaskedLM,
      TFTaForConditionalGeneration,
  )
  from transformers.models.bert.modeling_tf_bert import TF_BERT_PRETRAINED_MODEL_ARCHIVE_LIST
  from transformers.models.gpta.modeling_tf_gpta import TF_GPT2_PRETRAINED_MODEL_ARCHIVE_LIST
  from transformers.models.ta.modeling_tf_ta import TF_T5_PRETRAINED_MODEL_ARCHIVE_LIST

if is_torch_available():
  from transformers import (
      AutoModel,
      AutoModelForCausalLM,
      AutoModelForMaskedLM,
      AutoModelForPreTraining,
      AutoModelForQuestionAnswering,
      AutoModelForSeqaSeqLM,
      AutoModelForSequenceClassification,
      AutoModelWithLMHead,
      BertForMaskedLM,
      BertForPreTraining,
      BertForQuestionAnswering,
      BertForSequenceClassification,
      BertModel,
      GPTaLMHeadModel,
      RobertaForMaskedLM,
      TaForConditionalGeneration,
  )







@is_pt_tf_cross_test
class   A_	(  unittest.TestCase			):




 @slow
 def      lowercase	(					self       :    List[Any]    ):
      # for model_name in TF_BERT_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
      for model_name in ["bert-base-uncased"]:
           _UpperCAmelCase     							=   AutoConfig.from_pretrained(snake_case_    )
           self.assertIsNotNone(snake_case_    )
           self.assertIsInstance(snake_case_	,			snake_case_    )

           _UpperCAmelCase     							=   TFAutoModel.from_pretrained(snake_case_	,			from_pt=snake_case_    )
           self.assertIsNotNone(snake_case_    )
           self.assertIsInstance(snake_case_	,			snake_case_    )

           _UpperCAmelCase     							=   AutoModel.from_pretrained(snake_case_	,			from_tf=snake_case_    )
           self.assertIsNotNone(snake_case_    )
           self.assertIsInstance(snake_case_	,			snake_case_    )




 @slow
 def      lowercase	(					self       :    str    ):
      # for model_name in TF_BERT_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
      for model_name in ["bert-base-uncased"]:
           _UpperCAmelCase     							=   AutoConfig.from_pretrained(snake_case_    )
           self.assertIsNotNone(snake_case_    )
           self.assertIsInstance(snake_case_	,			snake_case_    )

           _UpperCAmelCase     							=   TFAutoModelForPreTraining.from_pretrained(snake_case_	,			from_pt=snake_case_    )
           self.assertIsNotNone(snake_case_    )
           self.assertIsInstance(snake_case_	,			snake_case_    )

           _UpperCAmelCase     							=   AutoModelForPreTraining.from_pretrained(snake_case_	,			from_tf=snake_case_    )
           self.assertIsNotNone(snake_case_    )
           self.assertIsInstance(snake_case_	,			snake_case_    )




 @slow
 def      lowercase	(					self       :    List[str]    ):
      for model_name in TF_GPT2_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
           _UpperCAmelCase     							=   AutoConfig.from_pretrained(snake_case_    )
           self.assertIsNotNone(snake_case_    )
           self.assertIsInstance(snake_case_	,			snake_case_    )

           _UpperCAmelCase     							=   TFAutoModelForCausalLM.from_pretrained(snake_case_	,			from_pt=snake_case_    )
           _UpperCAmelCase							,  _UpperCAmelCase     							=   TFAutoModelForCausalLM.from_pretrained(
               snake_case_	,			output_loading_info=snake_case_	,			from_pt=snake_case_    )
           self.assertIsNotNone(snake_case_    )
           self.assertIsInstance(snake_case_	,			snake_case_    )

           _UpperCAmelCase     							=   AutoModelForCausalLM.from_pretrained(snake_case_	,			from_tf=snake_case_    )
           _UpperCAmelCase							,  _UpperCAmelCase     							=   AutoModelForCausalLM.from_pretrained(
               snake_case_	,			output_loading_info=snake_case_	,			from_tf=snake_case_    )
           self.assertIsNotNone(snake_case_    )
           self.assertIsInstance(snake_case_	,			snake_case_    )




 @slow
 def      lowercase	(					self       :    Union[str, Any]    ):
      for model_name in TF_BERT_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
           _UpperCAmelCase     							=   AutoConfig.from_pretrained(snake_case_    )
           self.assertIsNotNone(snake_case_    )
           self.assertIsInstance(snake_case_	,			snake_case_    )

           _UpperCAmelCase     							=   TFAutoModelWithLMHead.from_pretrained(snake_case_	,			from_pt=snake_case_    )
           self.assertIsNotNone(snake_case_    )
           self.assertIsInstance(snake_case_	,			snake_case_    )

           _UpperCAmelCase     							=   AutoModelWithLMHead.from_pretrained(snake_case_	,			from_tf=snake_case_    )
           self.assertIsNotNone(snake_case_    )
           self.assertIsInstance(snake_case_	,			snake_case_    )




 @slow
 def      lowercase	(					self       :    Any    ):
      for model_name in TF_BERT_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
           _UpperCAmelCase     							=   AutoConfig.from_pretrained(snake_case_    )
           self.assertIsNotNone(snake_case_    )
           self.assertIsInstance(snake_case_	,			snake_case_    )

           _UpperCAmelCase     							=   TFAutoModelForMaskedLM.from_pretrained(snake_case_	,			from_pt=snake_case_    )
           _UpperCAmelCase							,  _UpperCAmelCase     							=   TFAutoModelForMaskedLM.from_pretrained(
               snake_case_	,			output_loading_info=snake_case_	,			from_pt=snake_case_    )
           self.assertIsNotNone(snake_case_    )
           self.assertIsInstance(snake_case_	,			snake_case_    )

           _UpperCAmelCase     							=   AutoModelForMaskedLM.from_pretrained(snake_case_	,			from_tf=snake_case_    )
           _UpperCAmelCase							,  _UpperCAmelCase     							=   AutoModelForMaskedLM.from_pretrained(
               snake_case_	,			output_loading_info=snake_case_	,			from_tf=snake_case_    )
           self.assertIsNotNone(snake_case_    )
           self.assertIsInstance(snake_case_	,			snake_case_    )




 @slow
 def      lowercase	(					self       :    int    ):
      for model_name in TF_T5_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
           _UpperCAmelCase     							=   AutoConfig.from_pretrained(snake_case_    )
           self.assertIsNotNone(snake_case_    )
           self.assertIsInstance(snake_case_	,			snake_case_    )

           _UpperCAmelCase     							=   TFAutoModelForSeqaSeqLM.from_pretrained(snake_case_	,			from_pt=snake_case_    )
           _UpperCAmelCase							,  _UpperCAmelCase     							=   TFAutoModelForSeqaSeqLM.from_pretrained(
               snake_case_	,			output_loading_info=snake_case_	,			from_pt=snake_case_    )
           self.assertIsNotNone(snake_case_    )
           self.assertIsInstance(snake_case_	,			snake_case_    )

           _UpperCAmelCase     							=   AutoModelForSeqaSeqLM.from_pretrained(snake_case_	,			from_tf=snake_case_    )
           _UpperCAmelCase							,  _UpperCAmelCase     							=   AutoModelForSeqaSeqLM.from_pretrained(
               snake_case_	,			output_loading_info=snake_case_	,			from_tf=snake_case_    )
           self.assertIsNotNone(snake_case_    )
           self.assertIsInstance(snake_case_	,			snake_case_    )




 @slow
 def      lowercase	(					self       :    Tuple    ):
      # for model_name in TF_BERT_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
      for model_name in ["bert-base-uncased"]:
           _UpperCAmelCase     							=   AutoConfig.from_pretrained(snake_case_    )
           self.assertIsNotNone(snake_case_    )
           self.assertIsInstance(snake_case_	,			snake_case_    )

           _UpperCAmelCase     							=   TFAutoModelForSequenceClassification.from_pretrained(snake_case_	,			from_pt=snake_case_    )
           self.assertIsNotNone(snake_case_    )
           self.assertIsInstance(snake_case_	,			snake_case_    )

           _UpperCAmelCase     							=   AutoModelForSequenceClassification.from_pretrained(snake_case_	,			from_tf=snake_case_    )
           self.assertIsNotNone(snake_case_    )
           self.assertIsInstance(snake_case_	,			snake_case_    )




 @slow
 def      lowercase	(					self       :    Tuple    ):
      # for model_name in TF_BERT_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
      for model_name in ["bert-base-uncased"]:
           _UpperCAmelCase     							=   AutoConfig.from_pretrained(snake_case_    )
           self.assertIsNotNone(snake_case_    )
           self.assertIsInstance(snake_case_	,			snake_case_    )

           _UpperCAmelCase     							=   TFAutoModelForQuestionAnswering.from_pretrained(snake_case_	,			from_pt=snake_case_    )
           self.assertIsNotNone(snake_case_    )
           self.assertIsInstance(snake_case_	,			snake_case_    )

           _UpperCAmelCase     							=   AutoModelForQuestionAnswering.from_pretrained(snake_case_	,			from_tf=snake_case_    )
           self.assertIsNotNone(snake_case_    )
           self.assertIsInstance(snake_case_	,			snake_case_    )




 def      lowercase	(					self       :    Union[str, Any]    ):
      _UpperCAmelCase     							=   TFAutoModelWithLMHead.from_pretrained(snake_case_	,			from_pt=snake_case_    )
      self.assertIsInstance(snake_case_	,			snake_case_    )
      self.assertEqual(model.num_parameters()	,			1_4_4_1_0    )
      self.assertEqual(model.num_parameters(only_trainable=snake_case_    )	,			1_4_4_1_0    )

      _UpperCAmelCase     							=   AutoModelWithLMHead.from_pretrained(snake_case_	,			from_tf=snake_case_    )
      self.assertIsInstance(snake_case_	,			snake_case_    )
      self.assertEqual(model.num_parameters()	,			1_4_4_1_0    )
      self.assertEqual(model.num_parameters(only_trainable=snake_case_    )	,			1_4_4_1_0    )




 def      lowercase	(					self       :    List[Any]    ):
      _UpperCAmelCase     							=   TFAutoModelWithLMHead.from_pretrained(snake_case_	,			from_pt=snake_case_    )
      self.assertIsInstance(snake_case_	,			snake_case_    )
      self.assertEqual(model.num_parameters()	,			1_4_4_1_0    )
      self.assertEqual(model.num_parameters(only_trainable=snake_case_    )	,			1_4_4_1_0    )

      _UpperCAmelCase     							=   AutoModelWithLMHead.from_pretrained(snake_case_	,			from_tf=snake_case_    )
      self.assertIsInstance(snake_case_	,			snake_case_    )
      self.assertEqual(model.num_parameters()	,			1_4_4_1_0    )
      self.assertEqual(model.num_parameters(only_trainable=snake_case_    )	,			1_4_4_1_0    )











'''simple docstring'''




def 	UpperCAmelCase_							(					__lowercase							:      str       )		->       list:


     '''simple docstring'''



     if n_term == "":
          return []
     _UpperCAmelCase     							=   []
     for temp in range(int(__lowercase       )       ):
          series.append(f'1/{temp + 1}' if series else "1"       )
     return series


if __name__ == "__main__":
  __SCREAMING_SNAKE_CASE     :str       =				input('''Enter the last number (nth term) of the Harmonic Series''')
  print('''Formula of Harmonic Series => 1+1/2+1/3 ..... 1/n''')
  print(harmonic_series(nth_term))




