Skip to content

25956: Fixes an errant preserve_rare_values warning, hones IFA dtype validation/bugfixes, cleans up precision warnings - #735

Merged
apbassett merged 7 commits into
mainfrom
25956-clean-up-warnings
Sep 21, 2026
Merged

apbassett merged 7 commits into
mainfrom
25956-clean-up-warnings

Conversation

@apbassett

Copy link
Copy Markdown
Member

Feature attribute suggestions

  • Consolidated the three duplicated max_distilled_cases warnings in PRVSuggestion into a single _warn_default_max_distilled_cases() helper, with an optional addendum for apply().

train() dtype validation

  • Numeric features are no longer flagged when held in a different numeric dtype (e.g. float64 where Int64 is expected). Previously this warned only on the nullable-integer path, while the plain int64 path silently truncated or overflowed the same data.
  • Fixed tz-aware datetime columns failing validate(coerce=True): the tz check tested the Series rather than its dtype.
  • Coercion failures in the categorical and datetime branches now report the underlying error instead of an empty message.
  • validate(coerce=True) no longer casts a boolean column that holds nulls, which silently turned every null into False.

Excessive float precision warnings

  • Features exceeding the supported 64-bit precision are collected and reported in one warning listing them all, via IFAWarningEmitter/IFAWarningCollector, instead of one warning per feature.
  • IFAWarningCollector.triage now dispatches through a mapping rather than an if/elif chain.

Tests

  • Added coverage for single-warning aggregation across all emitter types, the unknown-emitter-type error, and the float-precision warning.

@apbassett
apbassett requested review from a team as code owners September 17, 2026 21:56

@mkoistinen mkoistinen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with comments.

Comment thread howso/utilities/feature_attributes/pandas.py Outdated
Comment thread howso/utilities/feature_attributes/suggestions.py Outdated
Comment thread howso/utilities/feature_attributes/warnings.py
@apbassett apbassett changed the title 24252/25956: Fixes an errant preserve_rare_values warning, hones IFA dtype validation/bugfixes, cleans up precision warnings 25956: Fixes an errant preserve_rare_values warning, hones IFA dtype validation/bugfixes, cleans up precision warnings Sep 21, 2026
@apbassett
apbassett merged commit 9b43c94 into main Sep 21, 2026
42 checks passed
@apbassett
apbassett deleted the 25956-clean-up-warnings branch September 21, 2026 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants