The index of the current process used.
(self)
| 1943 | |
| 1944 | @property |
| 1945 | def process_index(self): |
| 1946 | """ |
| 1947 | The index of the current process used. |
| 1948 | """ |
| 1949 | requires_backends(self, ["torch"]) |
| 1950 | if self.distributed_state is not None: |
| 1951 | return self.distributed_state.process_index |
| 1952 | elif is_sagemaker_mp_enabled(): |
| 1953 | return smp.dp_rank() if not smp.state.cfg.prescaled_batch else smp.rdp_rank() |
| 1954 | return 0 |
| 1955 | |
| 1956 | @property |
| 1957 | def local_process_index(self): |
nothing calls this directly
no test coverage detected