PathmindAI / pathmind-api

2 stars 1 forks source link

Random Seeds #9

Closed ejunprung closed 2 years ago

ejunprung commented 2 years ago

How are seeds handled in Python? Is this something a user needs to define directly in their simulation or should it be something set in Pathmind API?

maxpumperla commented 2 years ago

we need to discuss what exactly to fix. What are your expectations e.g. in AnyLogic?

This could range from setting the TF seed in policy server, to completely fixing Ray tune and rllib during training, to fixing seeds in your simulation (where applicable).

ejunprung commented 2 years ago

In AnyLogic, you would set the seed in the Simulation experiment settings. So I think you would only set seeds in the simulation itself. We don't touch TF or Ray seeds as far as I know.

image

Just Google'ing randomly, it looks like the expectation is that the user would configure seeds themselves inside their simulation. https://github.com/openai/gym/blob/3eb699228024f600e1e5e98218b15381f065abff/gym/envs/classic_control/pendulum.py#L28

If that's the case, then I think we're good. I just wanted to confirm the expected workflow to ensure the result is valid.

slinlee commented 2 years ago

So it sounds like this can be closed now right?

maxpumperla commented 2 years ago

yeah, the problem is that we're putting that knowledge on the reader. you might have random seeds and numpy seeds etc. If it's helpful, we could help users by suggesting a set_seed method in the API.

ejunprung commented 2 years ago

Hmm, this might be a documentation thing so I'll close this issue. I'll add seeds to our examples so that the reader will see it and know what to do.