Full stack trace:
RecursionError                            Traceback (most recent call last)
/tmp/ipykernel_1850345/304243349.py in <module>
      5 from transformers import AutoModel
      6 #bert = AutoModel.from_pretrained('bert-base-cased')
----> 7 bert = TFAutoModel.from_pretrained('bert-base-uncased')
      8 
      9 # we can view the model using the summary method

~/anaconda3/envs/tf2/lib/python3.7/site-packages/transformers/models/auto/auto_factory.py in from_pretrained(cls, pretrained_model_name_or_path, *model_args, **kwargs)
    385         )
    386 
--> 387 
    388 def insert_head_doc(docstring, head_doc=""):
    389     if len(head_doc) > 0:

~/anaconda3/envs/tf2/lib/python3.7/site-packages/transformers/models/auto/auto_factory.py in _get_model_class(config, model_mapping)
    334         return supported_models
    335 
--> 336     name_to_model = {model.__name__: model for model in supported_models}
    337     architectures = getattr(config, "architectures", [])
    338     for arch in architectures:

~/anaconda3/envs/tf2/lib/python3.7/site-packages/transformers/models/auto/auto_factory.py in __getitem__(self, key)

~/anaconda3/envs/tf2/lib/python3.7/site-packages/transformers/models/auto/auto_factory.py in _load_attr_from_module(self, model_type, attr)

~/anaconda3/envs/tf2/lib/python3.7/site-packages/transformers/models/auto/auto_factory.py in getattribute_from_module(module, attr)

... last 1 frames repeated, from the frame below ...

~/anaconda3/envs/tf2/lib/python3.7/site-packages/transformers/models/auto/auto_factory.py in getattribute_from_module(module, attr)

RecursionError: maximum recursion depth exceeded in comparison