Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtruong committed Nov 7, 2024
1 parent b0f15a4 commit 2aee4b5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions weave/trace/custom_objs.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ class DecodeCustomObjectError(Exception):

# in future, could generalize as
# {target_cls.__module__}.{target_cls.__qualname__}
KNOWN_TYPES = ["PIL.Image.Image", "wave.Wave_read"]
KNOWN_TYPES = {
"Op",
"PIL.Image.Image",
"wave.Wave_read",
}


def encode_custom_obj(obj: Any) -> Optional[dict]:
Expand Down Expand Up @@ -71,7 +75,7 @@ def _decode_custom_obj(
def decode_custom_obj(
weave_type: dict,
encoded_path_contents: Mapping[str, Union[str, bytes]],
load_instance_op_uri: Optional[str],
load_instance_op_uri: Optional[str] = None,
) -> Any:
_type = weave_type["type"]
found_serializer = False
Expand Down

0 comments on commit 2aee4b5

Please sign in to comment.