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
Hi, when I trying to use the LineProfiler example, the following error message pops up:
import torch
from pytorch_memlab import LineProfiler
def inner():
... torch.nn.Linear(100, 100).cuda()
...
def outer():
... linear = torch.nn.Linear(100, 100).cuda()
... linear2 = torch.nn.Linear(100, 100).cuda()
... inner()
...
with LineProfiler(outer, inner) as prof:
... outer()
...
Traceback (most recent call last):
File "", line 1, in
File "/home/wyuancs/miniconda3/envs/response-selection/lib/python3.8/site-packages/pytorch_memlab/line_profiler/line_profiler.py", line 45, in init
self.add_function(func)
File "/home/wyuancs/miniconda3/envs/response-selection/lib/python3.8/site-packages/pytorch_memlab/line_profiler/line_profiler.py", line 59, in add_function
first_line = inspect.getsourcelines(func)[1]
File "/home/wyuancs/miniconda3/envs/response-selection/lib/python3.8/inspect.py", line 979, in getsourcelines
lines, lnum = findsource(object)
File "/home/wyuancs/miniconda3/envs/response-selection/lib/python3.8/inspect.py", line 798, in findsource
raise OSError('could not get source code')
OSError: could not get source code
How could I solve this problem? I tried to search online, but not find any solution
The text was updated successfully, but these errors were encountered:
Hi, when I trying to use the LineProfiler example, the following error message pops up:
How could I solve this problem? I tried to search online, but not find any solution
The text was updated successfully, but these errors were encountered: