我希望能够直接从TensorFlow使用BlueData的datatap。
使用pyspark,我可以执行以下操作:
df.write.parquet('dtap://OtherDataTap/airline-safety_zero_incidents.parquet')
请注意,我不需要设置任何库-随时可以使用。
通过Tensorflow通过DataTap读取/写入数据时我需要做什么?
根据文档:http : //docs.bluedata.com/40_datatap-tensorflow-support
import tensorflow as tf
import os
from tensorflow.python.framework.versions import CXX11_ABI_FLAG
CXX11_ABI_FLAG
bdfs_file_system_library = os.path.join("/opt/bluedata","libbdfs_file_system_shared_r1_9.so")
tf.load_file_system_library(bdfs_file_system_library)
with tf.gfile.Open("dtap://TenantStorage/tmp/tensorflow/dtap.txt", 'w') as f:
f.write("This is the dtap test file")
with tf.gfile.Open("dtap://TenantStorage/tmp/tensorflow/dtap.txt", 'r') as f:
content = f.read()
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句