samdow
October 27, 2022, 8:24pm
5
nat:
I’m getting this error:
File ~/.../lib/python3.9/site-packages/torch/utils/_mode_utils.py:28, in _wrap_init.<locals>.wrapped(self, inner, *args, **kwargs)
25 @functools.wraps(f)
26 def wrapped(self, *args, inner=undef, **kwargs):
27 if inner is undef:
---> 28 raise TypeError(
29 f"missing inner keyword argument; instead of constructing a {meta_init_error_info.mode_class_name} "
30 f"directly, pass the constructor to push_{meta_init_error_info.mode_name}_mode"
31 )
32 self.inner = inner
33 return f(self, *args, **kwargs)
TypeError: missing inner keyword argument; instead of constructing a TorchDispatchMode directly, pass the constructor to push_torch_dispatch_mode
This reads a bit too cryptic to me, what am I missing?
Hi! Please try updating to the latest version of PyTorch (1.13 is due out very soon if you’re able to hold on but I think this should also be updated in 1.12.1) and let me know if you’re still seeing this error