How do you get the rank in a callback in distributed pytorch lightning

I’m using a callback and want to get the rank in that callback when running with torch elastic, what’s the best way to do that?

Hello, my apology for the late reply. We are slowly converging to deprecate this forum in favor of the GH build-in version… Could we kindly ask you to recreate your question there - Lightning Discussions