mirror of
https://github.com/saymrwulf/stable-baselines3.git
synced 2026-11-18 09:54:10 +00:00
Update version + add docstring
This commit is contained in:
parent
b9c20d443d
commit
ef59a7e431
2 changed files with 7 additions and 1 deletions
2
setup.py
2
setup.py
|
|
@ -34,7 +34,7 @@ setup(name='torchy_baselines',
|
||||||
license="MIT",
|
license="MIT",
|
||||||
long_description="",
|
long_description="",
|
||||||
long_description_content_type='text/markdown',
|
long_description_content_type='text/markdown',
|
||||||
version="0.0.4",
|
version="0.0.5a",
|
||||||
)
|
)
|
||||||
|
|
||||||
# python setup.py sdist
|
# python setup.py sdist
|
||||||
|
|
|
||||||
|
|
@ -283,6 +283,12 @@ class BaseRLModel(object):
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
||||||
def set_random_seed(self, seed=None):
|
def set_random_seed(self, seed=None):
|
||||||
|
"""
|
||||||
|
Set the seed of the pseudo-random generators
|
||||||
|
(python, numpy, pytorch, gym, action_space)
|
||||||
|
|
||||||
|
:param seed: (int)
|
||||||
|
"""
|
||||||
if seed is None:
|
if seed is None:
|
||||||
return
|
return
|
||||||
set_random_seed(seed, using_cuda=self.device == th.device('cuda'))
|
set_random_seed(seed, using_cuda=self.device == th.device('cuda'))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue