Datasets: create_new_dataset

Created on 12 Apr 2019  路  8Comments  路  Source: tensorflow/datasets

Short description
I have issues using dataset generator

AttributeError: module 'tensorflow_datasets.core.naming' has no attribute 'snake_to_camelcase'

Also, colab says it's 1.0.2, but I only can see 1.0.1 on github

Environment information

  • Operating System: colab
  • Python version: 3.6.7
  • tensorflow-datasets/tfds-nightly version: '1.0.2'
  • tensorflow/tensorflow-gpu/tf-nightly/tf-nightly-gpu version: 1.13.1

Reproduction instructions

!python tensorflow_datasets/scripts/create_new_dataset.py \
        --dataset awesome_dataset \
        --type image
bug

Most helpful comment

The nightly version doesn't have this problem. Colab notebooks come with a preinstalled tfds-nightly version. So don't do pip install tensorflow_datasets.
If you want to install tensorflow_datasets for development on colab. I have shared a way in the colab notebook below.
https://colab.research.google.com/drive/1aawcl41lCb-f2HO0vXypxK40jCQK_K-X

All 8 comments

The create_new_dataset.py script is used to generate template files when wanting to add a new dataset in tensorflow_dataset repository. Its usage is not designed for Colab.
In colab, you'll have to write the code directly in the notebook, instead of creating new files. I'm gonna update the doc to clarify this.

@Conchylicultor
Yes, I actually wanted to add a new dataset. I have the same issue on my local machine. Just wanted to validate, if the issue is reproducible on colab as well, since local version is different

@lc0 Could you share a colab notebook with the error?

Interesting, now i see different versions. The code I had from the day I created the issue
image

And the one I can reproduce today
https://colab.research.google.com/drive/1jfgmYoy43y10qkKWVjTsyjblxw8aYtR6

The nightly version doesn't have this problem. Colab notebooks come with a preinstalled tfds-nightly version. So don't do pip install tensorflow_datasets.
If you want to install tensorflow_datasets for development on colab. I have shared a way in the colab notebook below.
https://colab.research.google.com/drive/1aawcl41lCb-f2HO0vXypxK40jCQK_K-X

hm, good to know. This kind of means, that current public version is broken, but only until the next release

What's the status on this? I still can't import tfds as I get:

module 'tensorflow_datasets' has no attribute 'public_api'

@drozzy which TFDS version, plateform,... are you using ?
What are you trying to import ?

import tensorflow_datasets as tfds should works, no matter which version you are using

Was this page helpful?
0 / 5 - 0 ratings