Skip to content

Commit

Permalink
fix train_test_prediction_drift reduce fails on value of 0 (#2346)
Browse files Browse the repository at this point in the history
  • Loading branch information
matanper committed Feb 21, 2023
1 parent 8121b7d commit ad707d2
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"""Module contains Train Test label Drift check."""

import typing as t
from numbers import Number

import numpy as np
import pandas as pd
Expand Down Expand Up @@ -247,7 +248,7 @@ def run_logic(self, context: Context) -> CheckResult:

def reduce_output(self, check_result: CheckResult) -> t.Dict[str, float]:
"""Return prediction drift score."""
if isinstance(check_result.value['Drift score'], float):
if isinstance(check_result.value['Drift score'], Number):
return {'Prediction Drift Score': check_result.value['Drift score']}

drift_values = list(check_result.value['Drift score'].values())
Expand Down

0 comments on commit ad707d2

Please sign in to comment.