question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IDE cannot correctly navigate to references, It will navigate all object to `transformers/utils/dummy_pt_objects.py`.

See original GitHub issue

Enviornment

  • 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:closed
  • Created 2 years ago
  • Reactions:12
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
matangovercommented, Sep 19, 2021

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.

1reaction
d-miketacommented, Apr 2, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found