tensorflow / tensorflow/datasets
Unconsumed dataset iterator raises: AttributeError: 'NoneType' object has no attribute 'eager_mode'
Open
Nobody has claimed this yet.
bug
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 1.6k
- Avg merge
- 3h 54m
- Merged PRs (30d)
- 1
Description
Crash on exit.
-
OS: Ubuntu 22.04
-
Python version: 3.10
-
tensorflow-datasets 4.5.2
-
tensorflow 2.8.0
-
Does the issue still exists with the last
tfds-nightlypackage (pip install --upgrade tfds-nightly) ? Yes.
Reproduction instructions
import tensorflow_datasets as tfds
ds_map, info = tfds.load('iris', as_supervised=True, with_info=True, batch_size=1)
ds = ds_map['train']
dataset_iterator = iter(ds)
Produces
AttributeError: 'NoneType' object has no attribute 'eager_mode'
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the provided tfds.load('iris', ...) reproduction and creating an iterator without consuming it. Trace the iterator cleanup path from that entry point to identify why eager_mode is accessed on None; done means exiting without the AttributeError and preserving the reported dataset behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, tensorflow
- Domain
- data, machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100