0

I use torch.utils.bottleneck to profile the code.

But I got some import errors as follow:

Traceback (most recent call last):
...
  File "./benchmark/csm/gnn.py", line 17, in <module>
    from ...data import sc as snc
ImportError: attempted relative import with no known parent package

How can I use 'torch.utils.bottleneck' to profile my code without modifying my project code?

Because there are a lot of from ...xx import xx as xx in my project.

Ausrada404
  • 499
  • 1
  • 7
  • 17
  • Does this answer your question? [Attempted relative import with no known parent package](https://stackoverflow.com/questions/55084977/attempted-relative-import-with-no-known-parent-package) – exciteabletom Aug 10 '20 at 05:54
  • Thanks a lot. I solved this by this [answer](https://stackoverflow.com/a/20309470/7394312) – Ausrada404 Aug 11 '20 at 01:38

0 Answers0