Skip to content

Commit

Permalink
chore: fix test_serialization_type
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanBredehoft committed Jul 11, 2024
1 parent 77cbdd6 commit 9a4fb52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/concrete/ml/pytest/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,11 +612,12 @@ def check_serialization(
dump_method_to_test = [False]

# If the given object provides a `dump`, `dumps` `dump_dict` method (which indicates that they
# are Concrete ML serializable classes), run the check using these as well
# are Concrete ML serializable classes) and are instantiated, run the check using these as well
if (
hasattr(object_to_serialize, "dump")
and hasattr(object_to_serialize, "dumps")
and hasattr(object_to_serialize, "dump_dict")
and not isinstance(object_to_serialize, type)
):
dump_method_to_test.append(True)

Expand Down
1 change: 0 additions & 1 deletion tests/common/test_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ def test_serialize_numpy_array(dtype):
)
def test_serialize_type(value):
"""Test serialization of type objects (trusted by Skops)."""
value = torch.nn.modules.activation.ReLU

check_serialization(value, type, check_str=False)

Expand Down

0 comments on commit 9a4fb52

Please sign in to comment.