-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Regarding the error related to SEED when I train in a homebrew environment #1039
Comments
Sorry, I don't understand your question. What exactly do you want to modify and why? Note that the current status of the master branch is (very) far ahead of the last release on pypi. We plan to release the updated version very soon, just need to finalize the docs and some minor issues |
I apologize for not explaining my question clearly earlier. What I mean is that during the training process, our program gets interrupted due to some external reasons. I used the following method to reload the previously obtained model, but the reward value returned to the starting point, as if the optimal model had not been saved. Is there a problem with the way I saved it?
|
So it has nothing to do with seeding? I was a bit confused by the issue's title. I haven't looked much into persistence yet, but @opcode81 has worked with it. Maybe he can also advice you on how to migrate to the newest code version - you could consider using the new high-level interfaces. They would be especially useful if you don't need to tinker with the algorithms and just want to train on a custom environments |
Regarding the seed issue, it is related to my second question in my initial inquiry. In order to ensure persistence, I have checked the Tianshou GitHub repository issues, and I found a similar answer: to save 'get_obs_rm()'.
However, using it requires the latest versions of Tianshou and Gymnasium. I have updated my Tianshou version, but I encountered a seed error as shown below.
Therefore, I would like to inquire how to resolve this issue or if there are any reference sources available |
Ooh, try to install an editable version of Tianshou, @MischaPanch changed a lot recently, and 0.5.1 was released 1 year ago. Alternatively, you can change the reset call in SubprocVecEnv, to remove the seed arg. In the newest version of Gymnasium, they changed the API not compatible with Gym 0.18, one of them is reset(seed=seed) to [init(seed=seed), reset(no seed)] |
Fun and slightly related fact: I'm working on a seed-related issue in Gymnasium right now ^^ |
I have visited the source website
I have searched through the issue tracker for duplicates
I have mentioned version numbers, operating system and environment, where applicable:
Sorry to bother you, but I have a few questions for you! I hope you can help me out.
1.
I am using a self-built environment, previously I was using version 0.4.7 of tianshou for training, saving the best_model and checkpoint during the training process, during the process the training will be interrupted for some reasons, I load the best_model or checkpoint, the training effect seems to go back to the original point (the value of the reward returns back to the original)
I checked some issues, I added get_obs_rm and updated to the corresponding version of tianshou (0.5.1), during the training process, there is a problem related to seed, I checked the example in the example, I don't know how to modify this part, I hope you can help me out!
parser.add_argument('--seed', type=int, default=10)
Thank you again!
The text was updated successfully, but these errors were encountered: