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)
| 1511 | |
| 1512 | |
| 1513 | def dump(obj, file, protocol=None, buffer_callback=None): |
| 1514 | """Serialize obj as bytes streamed into file |
| 1515 | |
| 1516 | protocol defaults to cloudpickle.DEFAULT_PROTOCOL which is an alias to |
| 1517 | pickle.HIGHEST_PROTOCOL. This setting favors maximum communication |
| 1518 | speed between processes running the same Python version. |
| 1519 | |
| 1520 | Set protocol=pickle.DEFAULT_PROTOCOL instead if you need to ensure |
| 1521 | compatibility with older versions of Python (although this is not always |
| 1522 | guaranteed to work because cloudpickle relies on some internal |
| 1523 | implementation details that can change from one Python version to the |
| 1524 | next). |
| 1525 | """ |
| 1526 | Pickler(file, protocol=protocol, buffer_callback=buffer_callback).dump(obj) |
| 1527 | |
| 1528 | |
| 1529 | def dumps(obj, protocol=None, buffer_callback=None): |