MCPcopy Create free account
hub / github.com/cloudpipe/cloudpickle / dump

Function dump

cloudpickle/cloudpickle.py:1527–1540  ·  view source on GitHub ↗

Serialize obj as bytes streamed into file protocol defaults to cloudpickle.DEFAULT_PROTOCOL which is an alias to pickle.HIGHEST_PROTOCOL. This setting favors maximum communication speed between processes running the same Python version. Set protocol=pickle.DEFAULT_PROTOCOL instead

(obj, file, protocol=None, buffer_callback=None)

Source from the content-addressed store, hash-verified

1525
1526
1527def dump(obj, file, protocol=None, buffer_callback=None):
1528 """Serialize obj as bytes streamed into file
1529
1530 protocol defaults to cloudpickle.DEFAULT_PROTOCOL which is an alias to
1531 pickle.HIGHEST_PROTOCOL. This setting favors maximum communication
1532 speed between processes running the same Python version.
1533
1534 Set protocol=pickle.DEFAULT_PROTOCOL instead if you need to ensure
1535 compatibility with older versions of Python (although this is not always
1536 guaranteed to work because cloudpickle relies on some internal
1537 implementation details that can change from one Python version to the
1538 next).
1539 """
1540 Pickler(file, protocol=protocol, buffer_callback=buffer_callback).dump(obj)
1541
1542
1543def dumps(obj, protocol=None, buffer_callback=None):

Callers

nothing calls this directly

Calls 2

PicklerClass · 0.85
dumpMethod · 0.80

Tested by

no test coverage detected