- r"""Hacks the call stack message to show all the local variables in
- case of RuntimeError or ValueError, and prints tensors as shape,
- dtype and device.
+ r"""Hacks the call stack message to show all the local variables
+ in case of relevant error, and prints tensors as shape, dtype and
+ device.
print(f' File "{filename}", line {line_no}, in {name}')
print(open(filename, "r").readlines()[line_no - 1])
print(f' File "{filename}", line {line_no}, in {name}')
print(open(filename, "r").readlines()[line_no - 1])