NVIDIA / apex

A PyTorch Extension: Tools for easy mixed precision and distributed training in Pytorch
BSD 3-Clause "New" or "Revised" License
8.33k stars 1.39k forks source link

Avoid importing apex transformer automatically #1801

Open nWEIdia opened 4 months ago

nWEIdia commented 4 months ago

and make error message more clear when apex.transformer is explicitly called on unsupported platform

In some configurations, pytorch may not be built with distributed support. So we avoid the auto import of transformer, which calls torch.distributed api explicitly.