Skip to content

Remove deprecated steps kwarg from GenerationStrategy (#5142)#5142

Open
saitcakmak wants to merge 1 commit intofacebook:mainfrom
saitcakmak:export-D99453408
Open

Remove deprecated steps kwarg from GenerationStrategy (#5142)#5142
saitcakmak wants to merge 1 commit intofacebook:mainfrom
saitcakmak:export-D99453408

Conversation

@saitcakmak
Copy link
Copy Markdown
Contributor

@saitcakmak saitcakmak commented Apr 3, 2026

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

@meta-cla meta-cla bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Apr 3, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Apr 3, 2026

@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
@meta-codesync meta-codesync bot changed the title Remove deprecated steps kwarg from GenerationStrategy Remove deprecated steps kwarg from GenerationStrategy (#5142) Apr 3, 2026
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 96.39%. Comparing base (53be145) to head (197957c).

Files with missing lines Patch % Lines
ax/storage/json_store/decoder.py 0.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants