IDE cannot correctly navigate to references, It will navigate all object to `transformers/utils/dummy_pt_objects.py`.
See original GitHub issueEnviornment
transformers
version: 4.5.1- Platform: macOS-11.1-arm64-arm-64bit
- Python version: 3.9.1
- PyTorch version (GPU?): 1.8.0 (False)
- Tensorflow version (GPU?): not installed (NA)
- Using GPU in script?: <fill in>
- Using distributed or parallel set-up in script?: <fill in>
Issues
When using PyCharm or VSCode with Pylance
(an extension), right-click model object will navigate users to transformers/utils/dummy_pt_objects.py
rather than the correct path.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:12
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Find all references to an object in python - Stack Overflow
Python's gc module has several useful functions, but it sounds like gc.get_referrers() is what you're looking for. Here's an example:
Read more >Import unresolved references – IDEs Support (IntelliJ Platform)
I have import statements at the beginning of my PY file with red squiggly lines under them - they do not cause the...
Read more >3. Data model — Python 3.11.1 documentation
All data in a Python program is represented by objects or by relations between ... but is not guaranteed to collect garbage containing...
Read more >Check or add an object library reference (VBA) - Microsoft Learn
The References dialog box shows all object libraries registered with ... If the application isn't listed, you can use the Browse button to ......
Read more >Find References - Documentation for Visual Assist
In Visual Studio 2015 and older IDEs, the Visual Assist implementation is more ... all references to a local variable, i.e. one whose...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Can this be reopened? It is still occurring and bothersome. The solution proposed by @mozharovsky is a good one, it can be converted into a PR if one of the maintainers agree.
Pyright and Pylance recently added this change: https://github.com/microsoft/pylance-release/issues/2402
I think this should now be straightforward to resolve by replacing the conditional statements highlighted by @mozharovsky with
try/except
.