Enable seeding actors for reproducible experiments (#5197)

*  enable graph-level worker-specific seed

*  lint checked

*  revised according to eric's suggestions

*  revised accordingly and added a test case

*  formated

* Update test_reproducibility.py

* Update trainer.py

* Update rollout_worker.py

* Update run_rllib_tests.sh

* Update worker_set.py
This commit is contained in:
Jones Wong
2019-07-17 23:31:34 -07:00
committed by Eric Liang
parent 63f49f95dd
commit 0af07bd493
5 changed files with 89 additions and 0 deletions
@@ -211,4 +211,6 @@ class WorkerSet(object):
remote_worker_envs=config["remote_worker_envs"],
remote_env_batch_wait_ms=config["remote_env_batch_wait_ms"],
soft_horizon=config["soft_horizon"],
seed=(config["seed"] + worker_index)
if config["seed"] is not None else None,
_fake_sampler=config.get("_fake_sampler", False))