Skip to content

Remove pyre-fixme/pyre-ignore from ax/utils/ source files#4983

Closed
saitcakmak wants to merge 1 commit intofacebook:mainfrom
saitcakmak:export-D95265024
Closed

Remove pyre-fixme/pyre-ignore from ax/utils/ source files#4983
saitcakmak wants to merge 1 commit intofacebook:mainfrom
saitcakmak:export-D95265024

Conversation

@saitcakmak
Copy link
Contributor

Summary:
Remove ~125 pyre-fixme/pyre-ignore suppression comments from 21 source files
in ax/utils/ by applying proper type fixes:

  • Use none_throws() for Optional unwrapping (e.g., grad access, sim_start_time)
  • Use cast() for GPyTorch model and FixedFeatureModel narrowing
  • Fix covariant TypeVar issue in Result.unwrap_or with new TypeVar U
  • Add proper annotations to StreamHandler[Any], Callable[..., Any]
  • Use helper functions for dynamic GPyTorch attribute access
  • Use np.asarray() for numpy return type consistency
  • Fix scipy stub limitations with positional args
  • Use record.__dict__ for safe attribute assignment

All 100 tests pass (0 failures across 6 test targets).

Differential Revision: D95265024

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

meta-codesync bot commented Mar 5, 2026

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

@codecov-commenter
Copy link

codecov-commenter commented Mar 5, 2026

Codecov Report

❌ Patch coverage is 81.71429% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.83%. Comparing base (f973cb4) to head (2d6bc40).

Files with missing lines Patch % Lines
ax/utils/stats/no_effects.py 7.40% 25 Missing ⚠️
ax/utils/sensitivity/derivative_gp.py 84.37% 5 Missing ⚠️
ax/utils/common/executils.py 66.66% 1 Missing ⚠️
ax/utils/sensitivity/sobol_measures.py 98.21% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4983   +/-   ##
=======================================
  Coverage   96.83%   96.83%           
=======================================
  Files         599      599           
  Lines       64518    64583   +65     
=======================================
+ Hits        62473    62536   +63     
- Misses       2045     2047    +2     

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

)

Summary:

Remove ~125 pyre-fixme/pyre-ignore suppression comments from 21 source files
in ax/utils/ by applying proper type fixes:

- Use `none_throws()` for Optional unwrapping (e.g., grad access, sim_start_time)
- Use `cast()` for GPyTorch model and FixedFeatureModel narrowing
- Fix covariant TypeVar issue in Result.unwrap_or with new TypeVar U
- Add proper annotations to StreamHandler[Any], Callable[..., Any]
- Use helper functions for dynamic GPyTorch attribute access
- Use `np.asarray()` for numpy return type consistency
- Fix scipy stub limitations with positional args
- Use `record.__dict__` for safe attribute assignment

All 100 tests pass (0 failures across 6 test targets).

Reviewed By: dme65

Differential Revision: D95265024
@meta-codesync
Copy link

meta-codesync bot commented Mar 6, 2026

This pull request has been merged in 9f50a93.

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