Unable to load a pretrained model 
### System Info

- `transformers` version: 4.18.0
- Platform: Linux-4.18.0-425.10.1.el8_7.x86_64-x86_64-with-glibc2.28
- Python version: 3.10.4
- Huggingface_hub version: 0.2.1
- PyTorch version (GPU?): 1.11.0 (True)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: yes
- Using distributed or parallel set-up in script?: no


OSError: Can't load config for '~/Unixcoder/model/changesets_model'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure '~/Unixcoder/model/changesets_model' is the correct path to a directory containing a config.json file

I am trying to load a second model during the course of training the first model. 
I am able to load the model for the first time, but not for the second time(even though all the config files are present)
I am trying to load the model downloaded from https://huggingface.co/microsoft/unixcoder-base/tree/main

### Who can help?

_No response_

### Information

- [X] The official example scripts
- [ ] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [X] My own task or dataset (give details below)

### Reproduction

1. load the model from downloaded version of https://huggingface.co/microsoft/unixcoder-base/tree/main
2. train the model on custom dataset
3. load the similar model that is pretrained on different dataset

### Expected behavior

model is successfully loaded 
Could you paste the code you are using?
```py
from transformers import AutoTokenizer, AutoModel

tokenizer = AutoTokenizer.from_pretrained("microsoft/unixcoder-base")
model = AutoModel.from_pretrained("microsoft/unixcoder-base")
```
works perfectly fine.<|||||>from transformers import (WEIGHTS_NAME, AdamW, get_linear_schedule_with_warmup,
                              RobertaConfig, RobertaModel, RobertaTokenizer)   

 tokenizer = RobertaTokenizer.from_pretrained(args.model_name_or_path)
    config = RobertaConfig.from_pretrained(args.model_name_or_path)
    model = RobertaModel.from_pretrained(args.model_name_or_path) 
.............................






    model = RobertaModel.from_pretrained('./changesets_model')
    model = Model(model)
    model.to(args.device)<|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.