# Issue Reproducing results

**URL:** <https://discuss.ray.io/t/issue-reproducing-results/2507>\
**Category:** RLlib\
**Created:** [June 14, 2021, 12:00am UTC](https://discuss.ray.io/t/issue-reproducing-results/2507 "2021-06-14T00:00:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![narik11](https://avatars.discourse-cdn.com/v4/letter/n/cc9497/32.png) [@narik11](https://discuss.ray.io/u/narik11)\
**Post date:** [June 14, 2021, 12:00am UTC](https://discuss.ray.io/t/issue-reproducing-results/2507/1 "2021-06-14T00:00:07Z")

</div>

Hi, Am having issue to reproduce the exact results. The seed for the environment is set properly based on [Reproducible training - setting seeds for all workers / environments](https://discuss.ray.io/t/reproducible-training-setting-seeds-for-all-workers-environments/1051)

and also shuffle\_sequences has been set to ‘False’ (just  
in case). is there anything am missing ??

 ![seed](https://us1.discourse-cdn.com/flex020/uploads/ray/original/2X/4/4c8044021a092ff72a01aabff39467d0ea6839b1.png)

---

<div class="post-metadata">

**Author:** ![Lauritowal](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/lauritowal/32/572_2.png) [@Lauritowal](https://discuss.ray.io/u/Lauritowal)\
**Post date:** [June 14, 2021, 9:19am UTC](https://discuss.ray.io/t/issue-reproducing-results/2507/2 "2021-06-14T09:19:14Z")

</div>

> [@narik11](#):
>
> shuffle\_sequences

I can be wrong here, but I don’t think it is necessary to set `shuffle_sequences` at all. It was not necessary for me 🙂

Did you set also the seed for the action\_space in your environment as described in the end of the discussion here : [Reproducible training - setting seeds for all workers / environments - #15 by Lauritowal](https://discuss.ray.io/t/reproducible-training-setting-seeds-for-all-workers-environments/1051/15)

`env.action_space.seed(RANDOM_SEED)`

---

<div class="post-metadata">

**Author:** ![mannyv](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/mannyv/32/606_2.png) [@mannyv](https://discuss.ray.io/u/mannyv)\
**Post date:** [June 14, 2021, 11:03am UTC](https://discuss.ray.io/t/issue-reproducing-results/2507/3 "2021-06-14T11:03:10Z")

</div>

I am guessing you are referring to the first empty list in the result. All the others look to be the same. This is expected behavior.

The reason is because the default config has a key called “create\_env\_on\_driver” that is False by default. The behavior of foreach\_env checks the driver and if it does not have an env it returns an empty list.

In the code snippet below local\_worker/local\_results refers to the driver.

> <https://github.com/ray-project/ray/blob/d89fb82bfb93b7a069b74d46fcacf462302881b1/rllib/evaluation/worker_set.py#L233-L251>

---

<div class="post-metadata">

**Author:** ![narik11](https://avatars.discourse-cdn.com/v4/letter/n/cc9497/32.png) [@narik11](https://discuss.ray.io/u/narik11)\
**Post date:** [June 14, 2021, 1:16pm UTC](https://discuss.ray.io/t/issue-reproducing-results/2507/4 "2021-06-14T13:16:16Z")

</div>

just want to make sure if `shuffle_sequences` has an impact.  
I haven’t set this “env.action\_space.seed(RANDOM\_SEED)” in the environment. I did this in the past while using SB3 (when we instantiate an object of the class and that too when we use random actions), can try here as well and confirm…

---

<div class="post-metadata">

**Author:** ![narik11](https://avatars.discourse-cdn.com/v4/letter/n/cc9497/32.png) [@narik11](https://discuss.ray.io/u/narik11)\
**Post date:** [June 14, 2021, 1:23pm UTC](https://discuss.ray.io/t/issue-reproducing-results/2507/5 "2021-06-14T13:23:13Z")

</div>

thanks for looking into it… attached the screen shot to make sure the seed value is the same in all the environments.
