Update version + add docstring

This commit is contained in:
Antonin Raffin 2019-11-18 15:11:19 +01:00
parent b9c20d443d
commit ef59a7e431
2 changed files with 7 additions and 1 deletions

View file

@ -34,7 +34,7 @@ setup(name='torchy_baselines',
license="MIT",
long_description="",
long_description_content_type='text/markdown',
version="0.0.4",
version="0.0.5a",
)
# python setup.py sdist

View file

@ -283,6 +283,12 @@ class BaseRLModel(object):
raise NotImplementedError()
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:
return
set_random_seed(seed, using_cuda=self.device == th.device('cuda'))