Commit 79711478 authored by Yuxin Wu's avatar Yuxin Wu

Add missing file from last commit

parent 805c44d5
#!/usr/bin/env python
import os
from .serialize import loads_msgpack, loads_pyarrow, dumps_msgpack, dumps_pyarrow
"""
Serialization that has compatibility guarantee (therefore is safe to store to disk).
"""
__all__ = ['loads', 'dumps']
# pyarrow has no compatibility guarantee
# use msgpack for persistent serialization, unless explicitly set from envvar
if os.environ.get('TENSORPACK_COMPATIBLE_SERIALIZE', 'msgpack') == 'msgpack':
loads = loads_msgpack
dumps = dumps_msgpack
else:
loads = loads_pyarrow
dumps = dumps_pyarrow
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment