feat: when validating OptimizationValidationMixin, fsdp_version shouldn't be flag as an warning#3718
Conversation
…dn't be flag as an warning
📝 WalkthroughWalkthroughThis PR refines the FSDP configuration validation logic to exclude ChangesFSDP configuration validation refinement
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/axolotl/utils/schemas/validation.py (1)
1091-1092: 💤 Low valueOptional: Consider clarifying the warning message to reflect the fsdp_version exception.
The warning says "Please omit the
fsdp_prefix from the any fields infsdp_config", butfsdp_versionis now explicitly excluded from this requirement. For improved clarity, consider:- "Configuring FSDP fields with the `fsdp_` prefix is deprecated. " - "Please omit the `fsdp_` prefix from the any fields in `fsdp_config`." + "Configuring FSDP fields with the `fsdp_` prefix is deprecated. " + "Please omit the `fsdp_` prefix from fields in `fsdp_config` (except `fsdp_version`)."This is a minor documentation improvement and not critical for functionality.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/axolotl/utils/schemas/validation.py` around lines 1091 - 1092, Update the deprecation warning text in validation.py that mentions configuring FSDP fields with the `fsdp_` prefix to explicitly note the exception for `fsdp_version`; locate the message that currently reads "Configuring FSDP fields with the `fsdp_` prefix is deprecated. Please omit the `fsdp_` prefix from the any fields in `fsdp_config`." and revise it to call out that `fsdp_version` is excluded (e.g., mention "except `fsdp_version`") so users know that `fsdp_version` may still keep the prefix when using `fsdp_config`.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/axolotl/utils/schemas/validation.py`:
- Around line 1091-1092: Update the deprecation warning text in validation.py
that mentions configuring FSDP fields with the `fsdp_` prefix to explicitly note
the exception for `fsdp_version`; locate the message that currently reads
"Configuring FSDP fields with the `fsdp_` prefix is deprecated. Please omit the
`fsdp_` prefix from the any fields in `fsdp_config`." and revise it to call out
that `fsdp_version` is excluded (e.g., mention "except `fsdp_version`") so users
know that `fsdp_version` may still keep the prefix when using `fsdp_config`.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: a798cd0b-e99d-4456-80e9-9b1e84abab70
📒 Files selected for processing (1)
src/axolotl/utils/schemas/validation.py
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
With the following config.yaml
We get the following WARNING
Where
fsdp_versionis part of FSDPConfigSummary by CodeRabbit
Bug Fixes
fsdp_versionin FSDP configurations was incorrectly treated as deprecated and rewritten during configuration normalization.