Skip to content

Fix: Replace assert statements with ValueError in runtime config validation - #8585

Open
mayuriphad wants to merge 1 commit into
deepspeedai:masterfrom
mayuriphad:fix-config-asserts
Open

mayuriphad wants to merge 1 commit into
deepspeedai:masterfrom
mayuriphad:fix-config-asserts

Conversation

@mayuriphad

Copy link
Copy Markdown

This PR replaces the \�ssert\ statements in \deepspeed/runtime/config.py\ with explicit \if not (cond): raise ValueError(...)\ checks. Using asserts is unsafe here because when Python is executed with optimization enabled (\python -O), assertion statements are completely removed, bypassing critical runtime configuration validation. Fixes #8572.

Copilot AI lite review requested due to automatic review settings September 18, 2026 10:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@pengdurice pengdurice closed this Sep 18, 2026
@pengdurice pengdurice reopened this Sep 18, 2026
…dation\n\nSigned-off-by: Mayuri <163738104+mayuriphad@users.noreply.github.com>
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.

[BUG] Runtime configuration validation is bypassed under python -O

3 participants