mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:30:26 +08:00
[BE] Remove dependency on six
and future
(#94709)
Remove the Python 2 and 3 compatibility library [six](https://pypi.org/project/six) and [future](https://pypi.org/project/future) and `torch._six`. We only support Python 3.8+ now. It's time to retire them. Pull Request resolved: https://github.com/pytorch/pytorch/pull/94709 Approved by: https://github.com/malfet, https://github.com/Skylion007
This commit is contained in:
committed by
PyTorch MergeBot
parent
39511697d4
commit
b005ec62b9
@ -959,7 +959,7 @@ def _create_jit_graph(
|
||||
|
||||
if isinstance(model, torch.jit.ScriptModule):
|
||||
try:
|
||||
graph = model.forward.graph
|
||||
graph = model.forward.graph # type: ignore[attr-defined]
|
||||
except AttributeError as e:
|
||||
raise RuntimeError("'forward' method must be a script method") from e
|
||||
_C._jit_pass_onnx_function_substitution(graph)
|
||||
|
Reference in New Issue
Block a user