-
Notifications
You must be signed in to change notification settings - Fork 109
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
Task config #289
Task config #289
Conversation
dataset = dataset.filter(dataset_filter) | ||
|
||
# It returns DatasetDict because we don't specify a split | ||
return dataset # type: ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we ignore the type here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it doesn't have correct type
load_dataset returns Dataset | DatasetDict | IterableDataset | IterableDatasetDict
, based on the input args and afaik there is unspecified contract that if the we don't provide streaming
and split
arg we get DatasetDict
. However there is no way to achieve this on typings level, so I just ignore this error.
If the question was why I put there the type: ignore
it's because even tho we don't have a typechecker in the quality checks, I do have it on in my vscode (pyright) and it shows red when there is a typing problem.
Looks great ! |
What does this implement/fix? Explain your changes.
Improved typings
I noticed that following args are unused, maybe we should create issue to implement that functionality or remove it ?