Open zpcore opened 2 months ago
@miladm @ManfeiBai @JackCaoG
Thanks, LGTM, let's add in 2.5 release
Can we pin this issue to the top of the issue list on GH? @zpcore
Can we pin this issue to the top of the issue list on GH? @zpcore
Issue pinned now.
Recently, we have started the process to reduce the torch_xla API footprint in favor of torch API to improve the usability. This RFC focuses on the process to deprecate any functions.
Backward compatibility
We propose to offer a 6 months (2 releases) grace period before completely removing the deprecated API. As is shown in the graph below:
Developers should follow the illustrated timeline with the following action:
API xxx will be deprecated in release X+2
.If we follow the timeline, the deprecated API should still be usable for two releases, in which we guarantee backward compatibility.
For each deprecated API, mention it in the release X’s release note including what’s the suggested new APIs and when to completely deprecate the old one.
Actions to take for deprecation:
Github actions for API deprecation
Before deprecate any APIs, create a github issue to include the following details:
How to mark function to be deprecated
Here is the example on the code changes if we want to deprecate
torch_xla/core/xla_model.py:xrt_world_size()
withtorch_xla/runtime.py:world_size()
. There are two ways to mark a function as deprecated:In torch_xla/runtime.py
def world_size(): ...