Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
pass untouched args as kwards in DPDataLoader
  • Loading branch information
Igor Shilov committed Nov 22, 2022
commit f61de4868d39e857c53bff2abb76f2cad17ebb6f
16 changes: 2 additions & 14 deletions opacus/data_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,11 @@ def __init__(
dataset: Dataset,
*,
sample_rate: float,
num_workers: int = 0,
collate_fn: Optional[_collate_fn_t] = None,
pin_memory: bool = False,
drop_last: bool = False,
timeout: float = 0,
worker_init_fn: Optional[_worker_init_fn_t] = None,
multiprocessing_context=None,
generator=None,
prefetch_factor: Optional[int] = None,
persistent_workers: bool = False,
distributed: bool = False,
**kwargs,
):
"""

Expand Down Expand Up @@ -175,19 +169,13 @@ def __init__(
super().__init__(
dataset=dataset,
batch_sampler=batch_sampler,
num_workers=num_workers,
collate_fn=wrap_collate_with_empty(
collate_fn=collate_fn,
sample_empty_shapes=sample_empty_shapes,
dtypes=dtypes,
),
pin_memory=pin_memory,
timeout=timeout,
worker_init_fn=worker_init_fn,
multiprocessing_context=multiprocessing_context,
generator=generator,
prefetch_factor=prefetch_factor,
persistent_workers=persistent_workers,
**kwargs,
)

@classmethod
Expand Down