tensorflow / tensorflow/datasets
Getting error when serialize a tfds object
Nobody has claimed this yet.
- 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 have tried serialize the response object from this code:
import tensorflow_datasets as tfds
(ds_train, ds_test), ds_info = tfds.load(
'mnist',
split=['train', 'test'],
shuffle_files=True,
as_supervised=True,
with_info=True,
)
response = {
"ds_train": ds_train,
"ds_test": ds_test,
"ds_info": ds_info,
}
But when i use the pickle.dump method to convert this dict to a binary file this exception is throwed:
tensorflow.python.framework.errors_impl.InternalError: Tensorflow type 21 not convertible to numpy dtype.
Can someone help me?
Environment information
(if applicable)
- Operating System: Debian
- Python version: 3.7
tensorflow-datasets/tfds-nightlyversion: stable
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
Reproduce the pickle.dump failure with the shown MNIST tfds.load example under Python 3.7, Debian, and the stable tensorflow-datasets version. No repository file, entry point, or test is named; done means determining whether these response objects are supported for serialization and capturing the result in a focused regression check or documented resolution.
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
- 30/100