Skip to content

Commit

Permalink
chore: fix test_mono_param_waraning
Browse files Browse the repository at this point in the history
  • Loading branch information
kcelia committed Sep 11, 2023
1 parent 0e39fb6 commit 45bc34f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/sklearn/test_sklearn_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1461,11 +1461,10 @@ def test_predict_correctness(
print("Compile the model")

with warnings.catch_warnings():
from concrete import fhe

if get_model_name(model) == "KNeighborsClassifier":
default_configuration.parameter_selection_strategy = (
fhe.ParameterSelectionStrategy.MONO
ParameterSelectionStrategy.MONO
)
fhe_circuit = model.compile(
x,
Expand Down Expand Up @@ -1690,6 +1689,10 @@ def test_mono_parameter_warnings(
if is_model_class_in_a_list(model_class, get_sklearn_linear_models()):
return

# KNN works only for ParameterSelectionStrategy.MULTI
if is_model_class_in_a_list(model_class, get_sklearn_neighbors_models()):
pytest.skip("Skipping predict_proba for KNN, doesn't work for now")

n_bits = min(N_BITS_REGULAR_BUILDS)

model, x = preamble(model_class, parameters, n_bits, load_data, is_weekly_option)
Expand Down

0 comments on commit 45bc34f

Please sign in to comment.