[cfg] chore: remove redundant fields and fix typo #4754
+1
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Clean up redundant field definitions in config dataclasses and fix a typo.
profilerfield fromFSDPActorConfig(already defined in parent classActorConfigat line 160)lorafield fromHFModelConfig(already defined at line 86 with proper type annotationdict[str, Any])constuct->constructChecklist Before Starting
Test
This PR only removes redundant code and fixes a typo. No functional changes.
profilerfield: Already defined in parent classActorConfigat line 160.FSDPActorConfiginherits fromActorConfig, so the duplicate at line 285 is unnecessary.lorafield: Two definitions existed inHFModelConfig:lora: dict[str, Any] = field(default_factory=dict)with comment "megatron lora config" (kept)lora: dict = field(default_factory=dict)without type parameters (removed)API and Usage Example
No API changes.
Design & Code Changes
verl/workers/config/actor.py: Remove duplicateprofilerfield fromFSDPActorConfig(inherited fromActorConfig:160)verl/workers/config/model.py: Remove duplicatelorafield (keepline 86withdict[str, Any], removeline 91withdict)verl/workers/config/model.py: Fix typoconstuct->constructChecklist Before Submitting
Important
Please check all the following items before requesting a review, otherwise the reviewer might deprioritize this PR for review.
pre-commit install && pre-commit run --all-files --show-diff-on-failure --color=alwaysci-requestchannel in theverlSlack workspace. (If not accessible, please try the Feishu group.)