-
Notifications
You must be signed in to change notification settings - Fork 21.7k
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
[dataloader] type annotation is broken #22135
Labels
module: dataloader
Related to torch.utils.data.DataLoader and Sampler
module: typing
Related to mypy type annotations
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Comments
I've also found that bunch of optional parameters are not labeled with def __init__(self, dataset: Dataset[T_co], batch_size: int=..., shuffle: bool=..., sampler: Sampler[int]=...,
num_workers: int=..., collate_fn: _collate_fn_t=..., pin_memory: bool=...,
drop_last: bool=..., timeout: float=..., worker_init_fn: _worker_init_fn_t=...) -> None: ...
def __init__(self, dataset: Dataset[T_co], batch_sampler: Sampler[Sequence[int]]=..., num_workers: int=...,
collate_fn: _collate_fn_t=..., pin_memory: bool=..., timeout: float=...,
worker_init_fn: _worker_init_fn_t=...) -> None: ...
def __init__(self, dataset, batch_size=1, shuffle=False, sampler=None,
batch_sampler=None, num_workers=0, collate_fn=default_collate,
pin_memory=False, drop_last=False, timeout=0,
worker_init_fn=None): So these are |
I think this is fixed by a couple recent PRs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
module: dataloader
Related to torch.utils.data.DataLoader and Sampler
module: typing
Related to mypy type annotations
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
In #19228 I did not update the type annotations. We should fix this.
The text was updated successfully, but these errors were encountered: