| 42 | # this version visible to type hinting actually matches all valid usages of the AutoScalingTensor |
| 43 | # so there is no significant discrepency between static analysis bahavior and actual runtime result. |
| 44 | class AutoScalingTensor(torch.Tensor): |
| 45 | def __init__(self, |
| 46 | shape: torch.Size | Sequence[int] | None, |
| 47 | grow_on: int, |
| 48 | init_tensor: torch.Tensor | None = None, |
| 49 | init_val: int | float | None = None, |
| 50 | **kwargs) -> None: ... |
| 51 | def __new__(cls, *args, **kwargs) -> "AutoScalingTensor": ... |
| 52 | def push(self, x: torch.Tensor) -> None: ... |
| 53 | @property |
| 54 | def current_size(self) -> int: ... |
| 55 | @property |
| 56 | def _curr_max_size(self) -> int: ... |
| 57 | @property |
| 58 | def tensor(self) -> torch.Tensor: ... |
| 59 | else: |
| 60 | class AutoScalingTensor: |
| 61 | def __init__(self, |
no outgoing calls
no test coverage detected