Repost : Get 404 client error when I execute example in /blob/main/tutorials/nlp/Relation_Extraction
State: closed | Pull request: no
Labels: name: bug

Maybe I misclick some button, so t post message again and give more detail

Describe the bug

In website [https://github.com/NVIDIA/NeMo/blob/main/tutorials/nlp/Relation_Extraction-BioMegatron.ipynb，](https://github.com/NVIDIA/NeMo/blob/main/tutorials/nlp/Relation_Extraction-BioMegatron.ipynb%EF%BC%8C) I run the code step by step, and i get the 404 client error on the last line of chapter "[Setting up a NeMo Experiment](https://github.com/NVIDIA/NeMo/issues/url)"

Steps/Code to reproduce bug

model = nemo_nlp.models.TextClassificationModel(cfg=config.model, trainer=trainer) in chapter "Setting up a NeMo Experiment"

Environment overview (please complete the following information)

    Method of NeMo install: Google Colaboratory,

Environment details

If NVIDIA docker image is used you don't need to specify these.
Otherwise, please provide:

    python 3.7.13
    pytorch 1.10.0
    cuda 11.1

Error Message:
 When I execute the following code:
                                                                trainer.fit(model)
 I get the following error message:

Traceback (most recent call last):
  File "/home/bob/anaconda3/envs/for_relation_extraction/lib/python3.8/site-packages/transformers/configuration_utils.py", line 594, in _get_config_dict
    resolved_config_file = cached_path(
  File "/home/bob/anaconda3/envs/for_relation_extraction/lib/python3.8/site-packages/transformers/file_utils.py", line 1921, in cached_path
    output_path = get_from_cache(
  File "/home/bob/anaconda3/envs/for_relation_extraction/lib/python3.8/site-packages/transformers/file_utils.py", line 2125, in get_from_cache
    _raise_for_status(r)
  File "/home/bob/anaconda3/envs/for_relation_extraction/lib/python3.8/site-packages/transformers/file_utils.py", line 2046, in _raise_for_status
    raise RepositoryNotFoundError(f"404 Client Error: Repository Not Found for url: {request.url}")
transformers.file_utils.RepositoryNotFoundError: 404 Client Error: Repository Not Found for url: https://huggingface.co/megatron-bert-cased/resolve/main/config.json

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/bob/anaconda3/envs/for_relation_extraction/lib/python3.8/site-packages/nemo/collections/nlp/modules/common/huggingface/huggingface_utils.py", line 112, in get_huggingface_lm_model
    automodel = AutoModel.from_pretrained(pretrained_model_name)
  File "/home/bob/anaconda3/envs/for_relation_extraction/lib/python3.8/site-packages/transformers/models/auto/auto_factory.py", line 424, in from_pretrained
    config, kwargs = AutoConfig.from_pretrained(
  File "/home/bob/anaconda3/envs/for_relation_extraction/lib/python3.8/site-packages/transformers/models/auto/configuration_auto.py", line 637, in from_pretrained
    config_dict, _ = PretrainedConfig.get_config_dict(pretrained_model_name_or_path, **kwargs)
  File "/home/bob/anaconda3/envs/for_relation_extraction/lib/python3.8/site-packages/transformers/configuration_utils.py", line 546, in get_config_dict
    config_dict, kwargs = cls._get_config_dict(pretrained_model_name_or_path, **kwargs)
  File "/home/bob/anaconda3/envs/for_relation_extraction/lib/python3.8/site-packages/transformers/configuration_utils.py", line 606, in _get_config_dict
    raise EnvironmentError(
OSError: megatron-bert-cased is not a local folder and is not a valid model identifier listed on 'https://huggingface.co/models'
If this is a private repository, make sure to pass a token having permission to this repo with `use_auth_token` or log in with `huggingface-cli login` and pass `use_auth_token=True`.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/bob/Desktop/PythonWork/Relation_Extraction/app.py", line 176, in <module>
    model = nemo_nlp.models.TextClassificationModel(cfg=config.model, trainer=trainer)
  File "/home/bob/anaconda3/envs/for_relation_extraction/lib/python3.8/site-packages/nemo/collections/nlp/models/text_classification/text_classification_model.py", line 60, in __init__
    self.bert_model = get_lm_model(
  File "/home/bob/anaconda3/envs/for_relation_extraction/lib/python3.8/site-packages/nemo/collections/nlp/modules/common/lm_utils.py", line 107, in get_lm_model
    model = get_huggingface_lm_model(
  File "/home/bob/anaconda3/envs/for_relation_extraction/lib/python3.8/site-packages/nemo/collections/nlp/modules/common/huggingface/huggingface_utils.py", line 114, in get_huggingface_lm_model
    raise ValueError(f"{pretrained_model_name} is not supported by HuggingFace. {e}")
ValueError: megatron-bert-cased is not supported by HuggingFace. megatron-bert-cased is not a local folder and is not a valid model identifier listed on 'https://huggingface.co/models'
If this is a private repository, make sure to pass a token having permission to this repo with `use_auth_token` or log in with `huggingface-cli login` and pass `use_auth_token=True`.