tensorflow / tensorflow/datasets

How to read multiple s3 bucket?

Open
#5,487 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help
Dominant language
Python
Stars
4.6k
Forks
1.6k
Avg merge
3h 54m
Merged PRs (30d)
1

Description

What I need help with / What I was wondering
I want to read multiple s3 bucket within a single process.
Here is psudo code:

  ```
  import tensorflow_datasets as tfds
  import tensorflow_io as tfio
  os.environ["AWS_ACCESS_KEY_ID"] = "xxxxxxxxx"
  os.environ["AWS_SECRET_ACCESS_KEY"] = "xxxxxxxxxx"
  # os.environ["AWS_REGION"] = "us-east-1"
  os.environ["S3_ENDPOINT"] = "http://ip1:80"
  os.environ["S3_USE_HTTPS"] = "0"
  os.environ["S3_VERIFY_SSL"] = "0"
  
  builder = tfds.builder_from_directory(builder_dir='s3://open_x_embodiment_origin/cmu_stretch/0.1.0/')
  
  os.environ["AWS_ACCESS_KEY_ID"] = "yyyyy"
  os.environ["AWS_SECRET_ACCESS_KEY"] = "yyyyyyyyyy"
  # os.environ["AWS_REGION"] = "us-east-1"
  os.environ["S3_ENDPOINT"] = "http://ip2:80"
  
  builder = tfds.builder_from_directory(builder_dir='s3://droid/1.0.0/')
  ```

I can only get the first bucket. When I builder from the second bucket, I fails with the message: FileNotFoundError: Could not load dataset info from s3://droid/1.0.0/dataset_info.json.

It seems like tfds can not read two buckets with different access keys. Is it right? or I should do something to connect two different buckets.

Best,
Looking forward to your reply.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report uses Python with tensorflow_datasets.builder_from_directory and tensorflow_io, targeting two s3 paths with different AWS credentials and endpoints. Start by reproducing the second call after the first and inspect the reported dataset_info.json FileNotFoundError; done means establishing whether two bucket configurations are supported in one process and documenting or testing the supported behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python, tensorflow
Domain
cloud, data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.