Skip to content

Conversation

@ISEEKYAN
Copy link
Collaborator

previously at #4086 I add a function register_megatron_training_hooks, in which we will retrieve several arguments from ddp_config and optimizer_config. Some of the arguments is introduced in newer versions of megatron.

This PR is to make compatible with older versions, especially the NPU CI.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 aims to improve compatibility with older versions of Megatron by safely accessing configuration attributes. The approach of using getattr is correct. However, the change is incomplete as one of the related configuration flags, align_grad_reduce, is still hardcoded. I've provided a suggestion to address this to make the compatibility fix more robust.

@wuxibin89 wuxibin89 merged commit ce19ed4 into volcengine:main Nov 14, 2025
72 of 77 checks passed
@ISEEKYAN ISEEKYAN deleted the fix_ci branch November 14, 2025 02:16
chenjiaoAngel added a commit to chenjiaoAngel/verl that referenced this pull request Nov 14, 2025
…lcengine#4116)

previously at volcengine#4086 I add a function `register_megatron_training_hooks`,
in which we will retrieve several arguments from ddp_config and
optimizer_config. Some of the arguments is introduced in newer versions
of megatron.

This PR is to make compatible with older versions, especially the NPU
CI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants