Skip to content

Commit

Permalink
Fix import in function
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbenayoun committed May 13, 2022
1 parent b69ef39 commit 373feb6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/transformers/utils/fx.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from packaging import version
from torch import nn
from torch.fx import Graph, GraphModule, Proxy, Tracer
from torch.fx.proxy import ParameterProxy

from .. import (
CONFIG_MAPPING,
Expand Down Expand Up @@ -638,8 +639,6 @@ def create_proxy(self, kind, target, args, kwargs, name=None, type_expr=None, pr
return rv

def _module_getattr(self, attr, attr_val, parameter_proxy_cache):
from torch.fx.proxy import ParameterProxy

if getattr(self, "_disable_module_getattr", False):
return attr_val
else:
Expand Down

0 comments on commit 373feb6

Please sign in to comment.