Skip to content

Commit

Permalink
Fix pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
vshampor committed Feb 27, 2023
1 parent 3167850 commit 7ec8146
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions nncf/torch/dynamic_graph/trace_tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,8 @@ class TracedTensor(torch.Tensor):
@staticmethod
def from_torch_tensor(tensor, tensor_meta: TensorMeta):
tensor.tensor_meta = tensor_meta
tensor._nncf_expired = False
tensor.__class__ = TracedTensor
return tensor

@staticmethod
def from_traced_tensor(tensor: 'TracedTensor', tensor_meta: TensorMeta):
tensor.tensor_meta = tensor_meta
#pylint:disable=protected-access
tensor._nncf_expired = False
return tensor

Expand Down
2 changes: 1 addition & 1 deletion tests/torch/test_tracing_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,4 @@ def test_no_cross_forward_run_dependency():
with TracingContext() as ctx:
ctx.enable_trace_dynamic_graph()
_ = module(tensor)
ctx.disable_trace_dynamic_graph()
ctx.disable_trace_dynamic_graph()

0 comments on commit 7ec8146

Please sign in to comment.