[Question] Training reproducibility
See original GitHub issueImportant Note: We do not do technical support, nor consulting and don’t answer personal questions per email. Please post your question on the RL Discord, Reddit or Stack Overflow in that case.
Question
Hey, I am working on an algorithm comparison for my custom environment. The environment generates a random scenario for every rollout. Therefore, training the algorithms based on the same data is preferred.
I have tested with set_random_seed(seed = 1)
or env.seed(seed = 1)
for the environment.
And model = A2C("MlpPolicy", env, seed = 1)
for the model.
None of them yields two identical training results.
It is appreciated if you can show me how to set it properly.
Checklist
- I have read the documentation (required)
- I have checked that there is no similar issue in the repo (required)
Issue Analytics
- State:
- Created a year ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Ensuring Training Reproducibility in PyTorch | LearnOpenCV
This blog post shows how to do reproducible training of deep learning models in PyTorch.
Read more >How to Solve Reproducibility in ML - neptune.ai
Reproducibility challenges in Machine Learning · 1. Lack of records · 2. Changes in data · 3. Hyperparameter inconsistency · 4. Randomness ·...
Read more >4 Challenges of Reproducibility in the Machine Learning ...
Reproducibility is crucial for developing an ML-based pipeline to provide correctness, credibility, and a baseline for a study. We anticipate that an ML...
Read more >5 – Reproducibility – Machine Learning Blog | ML@CMU
In this blog post, we will introduce the different types of reproducibility and delve into the reasons for the formulation of these questions...
Read more >Rigor & Reproducibility: Back to Basics - YouTube
One of NIH's goals is to exemplify and promote the highest level of scientific integrity, public accountability, and social responsibility ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I advise you to take inspiration from the implementation of the numerous environments integrated with gym 0.21: https://github.com/openai/gym/tree/c755d5c35a25ab118746e2ba885894ff66fb8c43
If you have difficulty doing this, I urge you to ask for help on this discord
Sb3 works with gym 0.21 (for now). The reset method in gym 0.21 doesn’t take any argument.
In gym 0.22 and above, reset takes several args including the seed. You are probably referring to the doc of gym 0.24. Aren’t you?