"Go to definion" in VS Code doesn't work properly for Transformers
It's not the bug of the library itself, but is it some kind of glitch that happens because of the design of the package.
The problem is when you use VS Code as an editor for your development and try to go to definion of some model, it routes you to wrong file. For example:
```
from transformers import SwinForImageClassification
model = SwinForImageClassification.from_pretrained("microsoft/swin-base-patch4-window7-224")
```
When you right click on **SwinForImageClassification** class and press "Go to Definition" it routes you to **transformers/utils/dummy_pt_objects.py** line 3634:
![image](https://user-images.githubusercontent.com/20703486/159967676-aa97230c-006b-4ecc-a55b-85784aa13cfa.png)
I don't know what this code does, but it's definetely not something that you want.
It's not specific for Swin transformer, I also experienced the same issue while working with Wav2Vec2 (I guess it's for all the models since the code is similar).

The correct file that should've been opened is **transformers/models/swin/modeling_swin.py**:
![image](https://user-images.githubusercontent.com/20703486/159968897-718b6043-d38f-4cc1-86e7-c63d448cf292.png)

I'm not sure why this happens, but maybe you should consider researching this issue and redesigning the library somehow, so that VS Code would open model code properly.

Please also let me know if you also have this problem (maybe it is just my local issue?).

Hi @Sorrow321 -- this structure is convenient for multiple reasons, including ensuring a given import doesn't fail because you imported something that you are not planning to use, but that has a missing dependency.

I had the same problem, VS Code is a bit silly here. Go to your VS Code settings, search for `python.languageserver`, and change it to Microsoft's `Jedi` (see image below). It should solve your issue -- it did the trick for me! Let us know if it worked.
 
<img width="626" alt="Screenshot 2022-03-28 at 15 24 45" src="https://user-images.githubusercontent.com/12240844/160419773-a57f1ce4-e9f5-4c65-89d2-a27a415d2495.png">
 <|||||>Hi @gante, thank you so much, it worked.