MCPcopy
hub / github.com/huggingface/smolagents / serialize_data

Method serialize_data

tests/test_serialization.py:907–913  ·  view source on GitHub ↗
(data, index)

Source from the content-addressed store, hash-verified

905 errors = []
906
907 def serialize_data(data, index):
908 try:
909 serialized = SafeSerializer.dumps(data, allow_pickle=False)
910 deserialized = SafeSerializer.loads(serialized, allow_pickle=False)
911 results.append((index, deserialized == data))
912 except Exception as e:
913 errors.append((index, e))
914
915 threads = []
916 test_data = [{"thread": i, "data": list(range(100))} for i in range(10)]

Callers

nothing calls this directly

Calls 3

dumpsMethod · 0.80
loadsMethod · 0.80
appendMethod · 0.80

Tested by

no test coverage detected