StatefulDataLoader.__init__ calls torch.set_vital("Dataloader", "enabled", "True"), but torch.set_vital was removed from PyTorch in pytorch/pytorch#178479 ("Remove TorchVitals", merged 2026-03-26).
Installing the latest PyTorch nightly with the current release of torchdata produces:
AttributeError: module 'torch' has no attribute 'set_vital'
The call is at:
https://github.com/pytorch/data/blob/main/torchdata/stateful_dataloader/stateful_dataloader.py
torch.set_vital("Dataloader", "enabled", "True") # type: ignore[attr-defined]
The fix should be straightforward: remove or guard this call (e.g. if hasattr(torch, "set_vital"): ...).
StatefulDataLoader.__init__callstorch.set_vital("Dataloader", "enabled", "True"), buttorch.set_vitalwas removed from PyTorch in pytorch/pytorch#178479 ("Remove TorchVitals", merged 2026-03-26).Installing the latest PyTorch nightly with the current release of
torchdataproduces:The call is at:
https://github.com/pytorch/data/blob/main/torchdata/stateful_dataloader/stateful_dataloader.py
The fix should be straightforward: remove or guard this call (e.g.
if hasattr(torch, "set_vital"): ...).