-
Notifications
You must be signed in to change notification settings - Fork 215
[skyrl-train] Refactor TIS to use more comprehensive off policy correction config #849
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
base: main
Are you sure you want to change the base?
Conversation
…out_correction
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request refactors the Truncated Importance Sampling (TIS) configuration into a more comprehensive rollout_correction system, which is a great improvement for structure and extensibility. The new implementation adds flexible rollout correction mechanisms, including different TIS ratio types and rejection masks. The changes are well-documented and handle the deprecation of old parameters gracefully. I've identified a bug in a conditional check that could cause a crash, and an opportunity to refactor for better efficiency and code clarity. My detailed feedback is in the comments below.
…kyRL into rollout_correction
… unite metrics under loss_metrics, other clean up
Overview
trainer.algorithm.use_tisandtrainer.algorithm.tis_imp_ratio_capfor deprecationtrainer.algorithm.off_policy_correctionconfig (see new config below)LossMetricsTypedDict containing loss metrics (previously returned just loss, clip_ratio)Off Policy Correction Config