Skip to content

Commit

Permalink
chore: restore test_sklearn
Browse files Browse the repository at this point in the history
  • Loading branch information
kcelia committed Nov 17, 2023
1 parent a0a2abd commit 66f6c41
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/concrete/ml/onnx/onnx_impl_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ def rounded_comparison(
"""

assert isinstance(_auto_rounder, AutoRounder)
half = 1 << (_auto_rounder.lsbs_to_remove - 1) if _auto_rounder.is_adjusted else 0

half = 1 << (_auto_rounder.lsbs_to_remove - 1) if _auto_rounder.lsbs_to_remove > 0 else 0
rounded_subtraction = round_bit_pattern((x - y) - half, lsbs_to_remove=_auto_rounder)

return (operation(rounded_subtraction),)
10 changes: 5 additions & 5 deletions tests/sklearn/test_sklearn_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@
def get_dataset(model_class, parameters, n_bits, load_data, is_weekly_option):
"""Prepare the the (x, y) data-set."""

# if not is_model_class_in_a_list(
# model_class, _get_sklearn_linear_models() + _get_sklearn_neighbors_models()
# ):
# if n_bits in N_BITS_WEEKLY_ONLY_BUILDS and not is_weekly_option:
# pytest.skip("Skipping some tests in non-weekly builds")
if not is_model_class_in_a_list(
model_class, _get_sklearn_linear_models() + _get_sklearn_neighbors_models()
):
if n_bits in N_BITS_WEEKLY_ONLY_BUILDS and not is_weekly_option:
pytest.skip("Skipping some tests in non-weekly builds")

# Get the data-set. The data generation is seeded in load_data.
x, y = load_data(model_class, **parameters)
Expand Down

0 comments on commit 66f6c41

Please sign in to comment.