-
-
Couldn't load subscription status.
- Fork 1.2k
Description
Question
Hello :)
In my setting I change the np_random generator of my envs
seed_sequence = np.random.SeedSequence(
env_seed,
spawn_key=(worker_index, env_context.vector_index, env_runner.config.in_evaluation),
)
rng = np.random.default_rng(seed_sequence)
rngs = rng.spawn(env.num_envs if _is_async(env) else 1)
# env: SyncVectorEnv | AsyncVectorEnv
env.set_attr("np_random", rngs)
env.np_random # <-- if async new generator, based on rngs but not the same as rngsFor sync environments the generators are like I expected identical.
For an async ones the final env.np_random that I get back from the pipe is not the same. What I wonder is, why does entropy and seed_sequence of the bit generator differ?
What I can tell is that my original rngs are used to create new random generators. I would like to now how and where in the code this happens.
In the end I would like to test if the framework that I use does not overwrite my own generators, with their own seed logic, which currently a bit difficult.
Thank you very much if you can provide me some insights.