Skip to content

Commit

Permalink
Fix mypy error in torch.random
Browse files Browse the repository at this point in the history
  • Loading branch information
sublee committed Oct 21, 2019
1 parent c7391bf commit b68f1a9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions stubs/torch/random.pyi
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#MODIFIED BY TORCHGPIPE
from contextlib import contextmanager
from typing import Generator, Iterable, Union

from typing import Any, Generator, Iterable, Union
from torch import ByteTensor, device


def set_rng_state(new_state: ByteTensor) -> None: ...
def get_rng_state() -> ByteTensor: ...

def manual_seed(seed: int) -> Any: ...
def seed() -> int: ...
def initial_seed() -> int: ...

@contextmanager
def fork_rng(devices: Iterable[Union[device, str, int]] = ..., enabled: bool = ...) -> Generator[None, None, None]: ...
Expand Down

0 comments on commit b68f1a9

Please sign in to comment.