是否可以通过uber/petastorm将 N 维数组存储到 Parquet 中?
1 回答

扬帆大鱼
TA贡献1799条经验 获得超9个赞
是的。Petastorm 在标准的 Apache Parquet 格式之上提供了一个自定义的编解码器层和一个模式扩展。n 维数组/张量将被序列化为二进制 blob 字段。从用户的角度来看,这些看起来像原生类型,取决于您使用的环境(纯 Python/pyspark:numpy/array、Tensorflow 中的 tf.Tensor 或 PyTorch 中的 torch Tensor)。
这里有一些易于理解的示例:https : //github.com/uber/petastorm/tree/master/examples/hello_world/petastorm_dataset
添加回答
举报
0/150
提交
取消