google / google/seqio

FunctionDataSource does not allow function with 3 positional arguments thus shuffling does not work

Open
#307 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
596
Forks
60
Avg merge
19h 23m
Merged PRs (30d)
1

Description

During creation it checks if function has only 2 positional arguments. For shuffling to be used it should also accept a third argument, `seed` or `seeds`. Otherwise an exception is thrown when trying to pass `shuffle=True` to `get_dataset()`.

https://github.com/google/seqio/blob/71e47acd6fd38d0cb1b89ce112df56f37e054f2c/seqio/dataset_providers.py#L341

Also it only allows `seed` and not `seeds` later. But this never comes into effect since the whole things fails during creation.
https://github.com/google/seqio/blob/71e47acd6fd38d0cb1b89ce112df56f37e054f2c/seqio/dataset_providers.py#L373

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.