mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-15 21:00:47 +00:00
[quant] Remove warning for quantized Tensor in __dir__ (#69265)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/69265 This is used in tab completion, we should not put warning here Test Plan: ci Imported from OSS Reviewed By: albanD Differential Revision: D32778736 fbshipit-source-id: f1bec5e09a8238ab41329ac2b64e6f3267799f6a
This commit is contained in:
parent
17e5200441
commit
84aa1ddedd
1 changed files with 0 additions and 2 deletions
|
|
@ -700,8 +700,6 @@ class Tensor(torch._C._TensorBase):
|
|||
def __dir__(self):
|
||||
if has_torch_function_unary(self):
|
||||
return handle_torch_function(Tensor.__dir__, (self,), self)
|
||||
if self.is_quantized:
|
||||
warnings.warn('Only a small subset of methods are supported for quantized tensors.')
|
||||
tensor_methods = dir(self.__class__)
|
||||
tensor_methods.remove('volatile') # deprecated
|
||||
attrs = list(self.__dict__.keys())
|
||||
|
|
|
|||
Loading…
Reference in a new issue