mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 00:20:18 +01:00
annotate torch._tensor_str (#48463)
Summary: Fixes https://github.com/pytorch/pytorch/issues/48462 Pull Request resolved: https://github.com/pytorch/pytorch/pull/48463 Reviewed By: mrshenli Differential Revision: D25187168 Pulled By: malfet fbshipit-source-id: bb4ad1c6d376ad37995638615080452c71e36959
This commit is contained in:
parent
36c87f1243
commit
2fe382e931
3
mypy.ini
3
mypy.ini
|
|
@ -68,9 +68,6 @@ ignore_errors = True
|
|||
[mypy-torch.testing._internal.distributed.*]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-torch._tensor_str]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-torch.nn.modules.container]
|
||||
ignore_errors = True
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,15 @@
|
|||
import math
|
||||
import torch
|
||||
from torch._six import inf
|
||||
from typing import Union, Optional
|
||||
|
||||
|
||||
class __PrinterOptions(object):
|
||||
precision = 4
|
||||
threshold = 1000
|
||||
edgeitems = 3
|
||||
linewidth = 80
|
||||
sci_mode = None
|
||||
precision: int = 4
|
||||
threshold: Union[str, float] = 1000
|
||||
edgeitems: int = 3
|
||||
linewidth: int = 80
|
||||
sci_mode: Optional[bool] = None
|
||||
|
||||
|
||||
PRINT_OPTS = __PrinterOptions()
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user