mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 13:44:15 +08:00
See #127836 for details. Pull Request resolved: https://github.com/pytorch/pytorch/pull/127846 Approved by: https://github.com/ezyang ghstack dependencies: #127842, #127843, #127844, #127845
12 lines
309 B
Python
12 lines
309 B
Python
# mypy: allow-untyped-defs
|
|
from typing_extensions import deprecated as _deprecated
|
|
|
|
|
|
@_deprecated(
|
|
"Usage of `backward_compatibility.worker_init_fn` is deprecated "
|
|
"as `DataLoader` automatically applies sharding in every worker",
|
|
category=FutureWarning,
|
|
)
|
|
def worker_init_fn(worker_id):
|
|
pass
|