Skip to content

Update return type annotation to match botorch API change#5014

Closed
Balandat wants to merge 1 commit into
facebook:mainfrom
Balandat:export-D96186306
Closed

Update return type annotation to match botorch API change#5014
Balandat wants to merge 1 commit into
facebook:mainfrom
Balandat:export-D96186306

Conversation

@Balandat
Copy link
Copy Markdown
Contributor

Summary:
Update the return type annotation of minimal_mixed_optimizer wrapper function to tuple[Tensor, Tensor | None] to match the updated return type of optimize_acqf_mixed_alternating from botorch.

The upstream botorch function signature changed in D96154880 to return tuple[Tensor, Tensor | None] instead of tuple[Tensor, Tensor], which caused the type-checking test to fail.

Differential Revision: D96186306

Summary:
Update the return type annotation of `minimal_mixed_optimizer` wrapper function to `tuple[Tensor, Tensor | None]` to match the updated return type of `optimize_acqf_mixed_alternating` from botorch.

The upstream botorch function signature changed in D96154880 to return `tuple[Tensor, Tensor | None]` instead of `tuple[Tensor, Tensor]`, which caused the type-checking test to fail.

Differential Revision: D96186306
@meta-cla meta-cla Bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Mar 11, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Mar 11, 2026

@Balandat has exported this pull request. If you are a Meta employee, you can view the originating Diff in D96186306.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.84%. Comparing base (1054802) to head (a0e673f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5014   +/-   ##
=======================================
  Coverage   96.84%   96.84%           
=======================================
  Files         601      601           
  Lines       64783    64783           
=======================================
  Hits        62739    62739           
  Misses       2044     2044           

☔ 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.

@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Mar 12, 2026

This pull request has been merged in 21b9307.

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 Merged meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants