random seed
zzchuman opened this issue · 3 comments
Hello, @lcodeca I want use rllib and sumo to control the traffic signal. And I want to make the experiment results reproducible.
So, I want to find all the random seed.
- numpy pandas
- tensorflow , torch
- rllib config
- sumo cmd
The above are all the random number seeds I found. Can U give me some advice?
Hi,
I set the seeds through the config files for rllib and sumo.
I do the same in my environments using https://numpy.org/doc/stable/reference/random/legacy.html#numpy.random.RandomState
Regards,
Lara
Hello Lara, I set the random seed as:
torch.manual_seed(42)
np.random.seed(65)
trainer = DQNTrainer(env="single", config={
"gamma": 0.99,
"seed": 42,
"framework": "torch",
})
sumo_cmd = [self._sumo_binary,
'-n', self._net,
'-r', self._route,
'--seed', 56]
And you use another random seed setting. from numpy.random import RandomState
Can you give some advice about torch rllib sumo?
I can't, cause I never used Torch.
What I can tell you, it's that I don't use np.random.seed(65) but I use RandomState. And I use it in my custom-made MARL environment. For the rest, I'm not sure what you are asking for.