Remove deprecated steps kwarg from GenerationStrategy (#5142)#5142
Open
saitcakmak wants to merge 1 commit intofacebook:mainfrom
Open
Remove deprecated steps kwarg from GenerationStrategy (#5142)#5142saitcakmak wants to merge 1 commit intofacebook:mainfrom
steps kwarg from GenerationStrategy (#5142)#5142saitcakmak wants to merge 1 commit intofacebook:mainfrom
Conversation
|
@saitcakmak has exported this pull request. If you are a Meta employee, you can view the originating Diff in D99453408. |
Summary: `GenerationStep(...)` already returns a `GenerationNode` (it's a factory class using `__new__`). The `steps=` kwarg on `GenerationStrategy.__init__` was a deprecated alias for `nodes=` that was scheduled for removal in early 2026. This diff: - Removes the `steps=` kwarg and `**kwargs` from `GenerationStrategy.__init__`, leaving only `nodes: list[GenerationNode]` - Removes the associated deprecation warning and XOR validation logic - Updates all 22 call sites across production code, tests, benchmarks, and the JSON decoder to use `nodes=` instead of `steps=` - Removes unused `warnings` and `Any` imports Reviewed By: lena-kashtelyan Differential Revision: D99453408
steps kwarg from GenerationStrategysteps kwarg from GenerationStrategy (#5142)
d0d77f3 to
197957c
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5142 +/- ##
=======================================
Coverage 96.38% 96.39%
=======================================
Files 613 613
Lines 68295 68288 -7
=======================================
- Hits 65829 65823 -6
+ Misses 2466 2465 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary:
GenerationStep(...)already returns aGenerationNode(it's a factory class using__new__). Thesteps=kwarg onGenerationStrategy.__init__was a deprecated alias fornodes=that was scheduled for removal in early 2026.This diff:
steps=kwarg and**kwargsfromGenerationStrategy.__init__, leaving onlynodes: list[GenerationNode]nodes=instead ofsteps=warningsandAnyimportsReviewed By: lena-kashtelyan
Differential Revision: D99453408