Skip to content

Remove pyre-fixme/pyre-ignore from ax/core/ source files#4976

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

Remove pyre-fixme/pyre-ignore from ax/core/ source files#4976
saitcakmak wants to merge 1 commit intofacebook:mainfrom
saitcakmak:export-D95264859

Conversation

@saitcakmak
Copy link
Contributor

Summary:
Remove ~29 pyre-fixme/pyre-ignore suppression comments from 11 source files
in ax/core/ by applying proper type fixes:

  • Use none_throws() for Optional unwrapping
  • Use cast() for type narrowing
  • Add proper type annotations (e.g., partial[Any], type[Any])
  • Refactor pandas itertuples() access to use Any-typed row variable
  • Make Parameter.clone() abstract with abstractmethod
  • Use float() casts for numeric comparisons
  • Remove explicit : int from enum members (pyre-fixme[35])

24 genuinely unfixable suppressions remain (documented):

  • copy_doc with property interaction
  • Property setter decorator type inference
  • np.floating/np.integer generic params (runtime isinstance limitation)
  • Intentional inconsistent overrides in OptimizationConfig subclasses
  • Abstract class instantiation via type(self)

Reviewed By: dme65

Differential Revision: D95264859

Summary:
Remove ~29 pyre-fixme/pyre-ignore suppression comments from 11 source files
in ax/core/ by applying proper type fixes:

- Use `none_throws()` for Optional unwrapping
- Use `cast()` for type narrowing
- Add proper type annotations (e.g., `partial[Any]`, `type[Any]`)
- Refactor pandas `itertuples()` access to use `Any`-typed row variable
- Make `Parameter.clone()` abstract with `abstractmethod`
- Use `float()` casts for numeric comparisons
- Remove explicit `: int` from enum members (pyre-fixme[35])

24 genuinely unfixable suppressions remain (documented):
- `copy_doc` with `property` interaction
- Property setter decorator type inference
- `np.floating`/`np.integer` generic params (runtime isinstance limitation)
- Intentional inconsistent overrides in OptimizationConfig subclasses
- Abstract class instantiation via `type(self)`

Reviewed By: dme65

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

meta-codesync bot commented Mar 4, 2026

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

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.86%. Comparing base (1cd0b89) to head (48afc5e).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4976   +/-   ##
=======================================
  Coverage   96.86%   96.86%           
=======================================
  Files         597      597           
  Lines       64230    64235    +5     
=======================================
+ Hits        62219    62224    +5     
  Misses       2011     2011           

☔ 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 meta-codesync bot closed this in 4059782 Mar 5, 2026
@meta-codesync
Copy link

meta-codesync bot commented Mar 5, 2026

This pull request has been merged in 4059782.

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