You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to generate a call graph project which happens to use PyTorch. Running pycallgraph graphviz -- ./main.py, I get the following traceback:
Traceback (most recent call last):
File "/var/www/PM-env/bin/pycallgraph", line 26, in <module>
exec(__file_content)
File "<string>", line 18, in <module>
File [redacted for anonymization], in <module>
import torch
File "/var/www/PM-env/lib/python3.8/site-packages/torch/__init__.py", line 629, in <module>
from .functional import * # noqa: F403
File "/var/www/PM-env/lib/python3.8/site-packages/torch/functional.py", line 6, in <module>
import torch.nn.functional as F
File "/var/www/PM-env/lib/python3.8/site-packages/torch/nn/__init__.py", line 1, in <module>
from .modules import * # noqa: F403
File "/var/www/PM-env/lib/python3.8/site-packages/torch/nn/modules/__init__.py", line 2, in <module>
from .linear import Identity, Linear, Bilinear, LazyLinear
File "/var/www/PM-env/lib/python3.8/site-packages/torch/nn/modules/linear.py", line 6, in <module>
from .. import functional as F
File "/var/www/PM-env/lib/python3.8/site-packages/torch/nn/functional.py", line 1278, in <module>
_VF.threshold_,
File "/var/www/PM-env/lib/python3.8/site-packages/torch/_VF.py", line 25, in __getattr__
def __getattr__(self, attr):
File "/var/www/PM-env/lib/python3.8/site-packages/pycallgraph/tracer.py", line 24, in tracer
self.processor.process(frame, event, arg, self.memory())
File "/var/www/PM-env/lib/python3.8/site-packages/pycallgraph/tracer.py", line 169, in process
module_path = module.__file__
File "/var/www/PM-env/lib/python3.8/site-packages/torch/_VF.py", line 26, in __getattr__
return getattr(self.vf, attr)
AttributeError: 'torch._C._VariableFunctionsClass' object has no attribute '__file__'
If I am reading this correctly, it means that pycallgraph cannot make a call graph of any project using PyTorch.
The text was updated successfully, but these errors were encountered:
I am trying to generate a call graph project which happens to use PyTorch. Running
pycallgraph graphviz -- ./main.py
, I get the following traceback:If I am reading this correctly, it means that pycallgraph cannot make a call graph of any project using PyTorch.
The text was updated successfully, but these errors were encountered: