def read_dill(file_):
"""
Deserialize a computation from a file or file-like object
:param file_: If string, writes to a file
:type file_: File-like object, or string
"""
if isinstance(file_, six.string_types):
with open(file_, 'rb') as f:
return dill.load(f)
else:
return dill.load(file_)
评论列表
文章目录