tensorflow / io

Dataset, streaming, and file system extensions maintained by TensorFlow SIG-IO
Apache License 2.0
702 stars 281 forks source link

can't use gfile to access oss:// since tensorflow_io.oss is refactored #1448

Open railic opened 3 years ago

railic commented 3 years ago

Now the following sample code will fail with error: "File system scheme 'oss' not implemented"

`

from tensorflow.io import gfile
# import tensorflow_io.oss <- this won't work

access_id = 'Access Key ID'
access_key = 'Access Key Secret'
host = "oss-cn-beijing.aliyuncs.com"
bucket = "oss://yikan-test-gfile"
oss_bucket_root = "{}\x01id={}\x02key={}\x02host={}/".format(bucket,
                                                             access_id,
                                                             access_key,
                                                             host)
oss_file = oss_bucket_root + 'test.txt'

gfile.stat(oss_file)

`

the problem is "tensorflow_io.oss" is not available in latest io pkg. How shall I include the oss plugin?

railic commented 3 years ago

@terrytangyuan who seems to be the owner