Remove deprecated PyTorch/XLA APIs by zpcore · Pull Request #3484 · huggingface/accelerate

Conversation

@zpcore

What does this PR do?

PyTorch/XLA has deprecated bunch of APIs (pytorch/xla#8915) for the upcoming 2.7 release. This PR integrates the change into accelerate package.

@zpcore

cc @SunMarc see if anyone can take a review. Thanks

SunMarc

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates ! Just a small question


if is_torch_xla_available():
import torch_xla.core.xla_model as xm
import torch_xla.runtime as xr

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we require a specific version of torch_xla to use xr.world_size() or xr.global_ordinal() ?

@SunMarc

Could you also do the same to transformers library as we had an issue that the deprecation ?

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@jeffhataws

@SunMarc