Fix sagemaker DP/MP
# What does this PR do?

Fixes the broken sagemaker tests, proved it works. 

Solves https://github.com/huggingface/transformers/issues/23390

Needs to be coordinated with the Accelerate pr as well
_The documentation is not available anymore as the PR was closed or merged._<|||||>Hello, devs. I encountered this error on Google Colab (Python 3.10) and transformers 4.30.1.

```
❱ 3386 │   │   │   self.args.distributed_state is None and self.local_rank ! 

AttributeError: 'CLTrainer' object has no attribute 'local_rank'
```

It looks like the line was added by this change.

By looking through the code, I suspect `self.local_rank` should be `self.args.local_rank`. I'm fairly new to this library, so apologies if my guess is wrong.<|||||>Indeed. Would you like to open a PR with the fix?<|||||>Sure, I can open a PR in a few days. But I'm actually pretty new to this repo, so please feel free to make a quick fix for that.<|||||>cc @muellerzr might be worth a quick fix.<|||||>Hi. I just opened #24297. 