Skip to content

Commit

Permalink
feat: enable import of fitted linear sklearn models
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanBredehoft committed Sep 21, 2023
1 parent 8ed0eac commit dd89497
Show file tree
Hide file tree
Showing 14 changed files with 639 additions and 253 deletions.
6 changes: 3 additions & 3 deletions src/concrete/ml/common/serialization/decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
UniformQuantizationParameters,
UniformQuantizer,
)
from ...sklearn import get_sklearn_models
from ...sklearn import get_sklearn_all_models
from . import SUPPORTED_TORCH_ACTIVATIONS, USE_SKOPS

# If USE_SKOPS is False or Skops can't be imported, default to pickle
Expand Down Expand Up @@ -49,7 +49,7 @@ def _get_fully_qualified_name(object_class: Type) -> str:
]

_TRUSTED_CONCRETE_MODELS = [
_get_fully_qualified_name(model_class) for model_class in get_sklearn_models()["all"]
_get_fully_qualified_name(model_class) for model_class in get_sklearn_all_models()
]

# Define all the trusted types that Skops should consider
Expand Down Expand Up @@ -181,7 +181,7 @@ def object_hook(d: Any) -> Any:
# `dump_dict` and `load_dict` method) if not already done
if not SERIALIZABLE_CLASSES:
serializable_classes = (
get_sklearn_models()["all"]
get_sklearn_all_models()
+ list(ALL_QUANTIZED_OPS)
+ [
QuantizedArray,
Expand Down
Loading

0 comments on commit dd89497

Please sign in to comment.