Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel Mode: AssertionError: No examples were yielded. #5

Open
emfebert opened this issue May 24, 2024 · 1 comment
Open

Parallel Mode: AssertionError: No examples were yielded. #5

emfebert opened this issue May 24, 2024 · 1 comment

Comments

@emfebert
Copy link

emfebert commented May 24, 2024

Hi,

I'd like to run dataset generation using beam and I'm getting the following error:

shard_boundaries = _get_shard_boundaries(num_examples, num_shards)

File "/home/febert/anaconda3/envs/rlds_env/lib/python3.9/site-packages/tensorflow_datasets/core/writer.py", line 142, in _get_shard_boundaries
raise AssertionError("No examples were yielded.")
AssertionError: No examples were yielded.

Dataset generation in a single process works fine.

@kpertsch
Copy link
Owner

For multi-threaded generation, please use the multithreading branch of the repo -- you can just copy your logic for parsing an example into the dataset generator there and control the level of parallelism with the N_WORKERS variable:

N_WORKERS = 10 # number of parallel workers for data conversion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants