Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] How to Manually Control Training Steps in Omnisafe PPO-Lag #351

Open
2 of 3 tasks
wayne-weiwei opened this issue Sep 25, 2024 · 0 comments
Open
2 of 3 tasks
Labels
question Further information is requested

Comments

@wayne-weiwei
Copy link

Required prerequisites

Questions

Thank you very much for creating such an excellent tool. I am currently using the PPO-Lag algorithm from the Omnisafe library to train a custom environment. Is that possible to manually control the training process in the custom environment instead of fully relying on the automated python train_policy.py --algo PPOLag --env-id SafetyPointGoal1-v0 --parallel 1 --total-steps 10000000 --device cpu --vector-env-nums 1 --torch-threads 1, for example by using a loop like this:

action, _states = model.learn(obs)
obs, reward, terminated, truncated, info = env.step(action)

If so, what is the recommended way to implement such a manual training loop in Omnisafe, while maintaining the core functionalities of PPO-Lag for action prediction and environment interaction?

Thank you for your time, and for developing Omnisafe! I look forward to any advice or recommendations you can offer.

@wayne-weiwei wayne-weiwei added the question Further information is requested label Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant