Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/tabular warning #606

Merged
merged 3 commits into from
Sep 6, 2022
Merged

Feature/tabular warning #606

merged 3 commits into from
Sep 6, 2022

Conversation

ascillitoe
Copy link
Contributor

Resolves #588.

The following warning is raised when a categories_per_feature dict is not provided:

warnings.warn('No `categories_per_feature` dict provided so all features are assumed to be categorical. '
              '`KSDrift` will be applied to all features.')

@codecov-commenter
Copy link

codecov-commenter commented Sep 6, 2022

Codecov Report

Merging #606 (1282aaf) into master (586ceea) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #606   +/-   ##
=======================================
  Coverage   83.58%   83.58%           
=======================================
  Files         207      207           
  Lines       13838    13840    +2     
=======================================
+ Hits        11566    11568    +2     
  Misses       2272     2272           
Impacted Files Coverage Δ
alibi_detect/cd/tabular.py 97.72% <100.00%> (+0.10%) ⬆️

# No categories_per_feature dict so assume no categorical features present
else:
self.x_ref_categories, self.cat_vars = {}, []
warnings.warn('No `categories_per_feature` dict provided so all features are assumed to be categorical. '
Copy link
Contributor

Choose a reason for hiding this comment

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

"... all features are assumed to be numerical." instead of categorical.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ooops, good spot, thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Corrected now! 👍🏻

@arnaudvl arnaudvl self-requested a review September 6, 2022 14:38
@ascillitoe ascillitoe merged commit ada0c66 into SeldonIO:master Sep 6, 2022
@ascillitoe ascillitoe deleted the feature/tabular_warning branch September 6, 2022 15:36
ascillitoe added a commit that referenced this pull request Nov 8, 2022
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.

Raise a warning if TabularDrift used with categories_per_feature=None
3 participants