Skip to content

Commit 06fba02

Browse files
committed
v1: adjust range for seed to be compatible with envpool
1 parent a86e246 commit 06fba02

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tianshou/highlevel/env.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ def _next_seed(rng: np.random.Generator) -> int:
389389
:param rng: the random number generator
390390
:return: the sampled random seed
391391
"""
392-
return int(rng.integers(0, 2**64, dtype=np.uint64))
392+
return int(rng.integers(-2**31, 2**31, dtype=np.int32)) # int32 is needed for envpool compatibility
393393

394394
@abstractmethod
395395
def _create_env(self, mode: EnvMode) -> Env:

0 commit comments

Comments
 (0)