SeldonIO / alibi-detect

Algorithms for outlier, adversarial and drift detection
https://docs.seldon.io/projects/alibi-detect/en/stable/
Other
2.21k stars 220 forks source link

Convert threshold to float type acorss the new outlier detectors #832

Closed mauicv closed 1 year ago

mauicv commented 1 year ago

What is this

This PR fixes: #809. Specifically it ensures that the threshold value outputted by the outlier detectors on a predict call is of type float across both Sklearn and PyTorch backends.

codecov[bot] commented 1 year ago

Codecov Report

Merging #832 (b03bfd8) into master (8b2dcbb) will increase coverage by 0.00%. The diff coverage is 100.00%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/SeldonIO/alibi-detect/pull/832/graphs/tree.svg?width=650&height=150&src=pr&token=gwntCwhaGT&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=SeldonIO)](https://app.codecov.io/gh/SeldonIO/alibi-detect/pull/832?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=SeldonIO) ```diff @@ Coverage Diff @@ ## master #832 +/- ## ======================================= Coverage 81.86% 81.86% ======================================= Files 159 159 Lines 10317 10319 +2 ======================================= + Hits 8446 8448 +2 Misses 1871 1871 ``` | [Impacted Files](https://app.codecov.io/gh/SeldonIO/alibi-detect/pull/832?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=SeldonIO) | Coverage Δ | | |---|---|---| | [alibi\_detect/od/pytorch/base.py](https://app.codecov.io/gh/SeldonIO/alibi-detect/pull/832?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=SeldonIO#diff-YWxpYmlfZGV0ZWN0L29kL3B5dG9yY2gvYmFzZS5weQ==) | `97.29% <100.00%> (+0.07%)` | :arrow_up: |