tensorflow: tf.io.gfile.listdir is inconsistent between GCS dir and local dir - adds trailing slashes
System information
- TensorFlow version (use command below): v2.0.0-rc2-26-g64c3d38 2.0.0
- Python version: 3.6
Describe the current behavior
When listing the directory items for a GCS dir, listdir returns names with trailing slashes. When listing the directory items for a local dir, listdir returns names without trailing slashes.
Describe the expected behavior
The behavior needs to be consistent.
Standalone code to reproduce the issue
tensorflow.io.gfile.listdir('gs://bucket/dir')
>>> ['eval/', 'train/']
tensorflow.io.gfile.listdir('..')
>>> ['eval', 'train']
About this issue
- Original URL
- State: open
- Created 7 years ago
- Comments: 22 (3 by maintainers)
Hi,
Thank you for opening this issue. Since this issue has been open for a long time, the code/debug information for this issue may not be relevant with the current state of the code base.
The Tensorflow team is constantly improving the framework by fixing bugs and adding new features. We suggest you try the latest TensorFlow version with the latest compatible hardware configuration which could potentially resolve the issue. If you are still facing the issue, please create a new GitHub issue with your latest findings, with all the debugging information which could help us investigate.
Please follow the release notes to stay up to date with the latest developments which are happening in the Tensorflow space.
I’ve tested this on 2.2.0. It’s still broken.