Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Commit

Permalink
Merge pull request #301 from credo-ai/fix/DummyClassifier_predict_pro…
Browse files Browse the repository at this point in the history
…ba_validation

Only call check_array if predict or predict proba is provided
  • Loading branch information
IanAtCredo authored Jan 17, 2023
2 parents 2327167 + 342319c commit 45b3069
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions credoai/artifacts/model/classification_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,14 @@ def __init__(
tags=None,
):
self.model_like = model_like
self.predict_output = check_array(
predict_output, ensure_2d=False, allow_nd=True
)
self.predict_proba_output = check_array(
predict_proba_output, ensure_2d=False, allow_nd=True
)
if predict_output is not None:
self.predict_output = check_array(
predict_output, ensure_2d=False, allow_nd=True
)
if predict_proba_output is not None:
self.predict_proba_output = check_array(
predict_proba_output, ensure_2d=False, allow_nd=True
)
self.name = name
self.tags = tags

Expand Down

0 comments on commit 45b3069

Please sign in to comment.