Repository navigation
MNT: clarify fitted-state check in adversarial mitigation - #1673
Merged
romanlutz merged 4 commits intoAug 17, 2026
Merged
Conversation
Point the fitted-state probe in _AdversarialFairness._validate_input at _is_setup, the class's canonical fitted flag (see __sklearn_is_fitted__), matching the original check_is_fitted semantics, and fix the string quotes to satisfy black/ruff. Add a v0.15.0 changelog entry for the change. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 94f7b737-5a80-4f4a-8853-ac7994305bcd
…ted-state-check # Conflicts: # docs/user_guide/installation_and_version_guide/v0.15.0.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #1657 by replacing the
try/except NotFittedErrorfit-state probe in_AdversarialFairness._validate_inputwith a directhasattr(self, 'backendEngine_')check.This keeps the existing behavior intact while removing the stale
# TODO check thisand avoiding the ambiguity of probing fit state through an exception path.Tests: 288 passed (targeted adversarial tests,
python -m pytest test/unit/adversarial -q)