Repository: huggingface/accelerate

Issue:
[bug] - AcceleratorState initialization in DS case ignores timeout argument
### System Info

```Shell
- `Accelerate` version: 0.16.0
- Platform: Linux-5.4.0-1100-gcp-x86_64-with-glibc2.17
- Python version: 3.8.13
- Numpy version: 1.23.3
- PyTorch version (GPU?): 1.12.1+cu102 (True)
- `Accelerate` default config:
        Not found
```


### Information

- [ ] The official example scripts
- [X] My own modified scripts

### Tasks

- [ ] One of the scripts in the examples/ folder of Accelerate or an officially supported `no_trainer` script in the `examples` folder of the `transformers` repo (such as `run_no_trainer_glue.py`)
- [X] My own task or dataset (give details below)

### Reproduction

Essentially, the problem is that this line 
https://github.com/huggingface/accelerate/blob/639c1da8df8cdc0dfa4dd057c7f3e7e01b40f3f5/src/accelerate/state.py#L129
does not use kwargs. So even if I tune the timeout with a `InitProcessGroupKwargs(timeout=...)`, deepspeed which initialize the dist backend, doesn't have the new timeout.
I believe the line should pass the `timeout` arg conditionally on the fact that `kwargs` has it.

in my `main.py`:
```
    kwargs_handlers = [InitProcessGroupKwargs(timeout=timedelta(seconds=3_600))]
    accelerator = Accelerator(
        log_with="all",
        rng_types=["torch", "cuda", "generator"],
        gradient_accumulation_steps=GRAD_ACC_SIZE,
        kwargs_handlers=kwargs_handlers,
    )
```    

`accelerate_config.yaml`:
```compute_environment: LOCAL_MACHINE
deepspeed_config:
  deepspeed_multinode_launcher: standard
  deepspeed_config_file: /home/victor/m4/experiments/pretraining/vloom/tr_victordebug/ds_config.json
  zero3_init_flag: true
distributed_type: DEEPSPEED
fsdp_config: {}
machine_rank: 0
main_process_ip: null
main_process_port: 29399
main_training_function: main
num_machines: 1
num_processes: 1
use_cpu: false
gpu_ids: 0,
```
`ds_config.json`:
```
{
    "bf16": {
        "enabled": false
    },
    "fp16": {
        "enabled": false,
        "auto_cast": true,
        "loss_scale": 0.0,
        "initial_scale_power": 1,
        "loss_scale_window": 1000,
        "hysteresis": 2,
        "min_loss_scale": 1
    },
    "zero_optimization": {
        "stage": 3,
        "allgather_partitions": true,
        "allgather_bucket_size": 5e8,
        "overlap_comm": false,
        "reduce_scatter": true,
        "reduce_bucket_size": "auto",
        "contiguous_gradients": true,
        "stage3_gather_16bit_weights_on_model_save": true,
        "offload_optimizer": {
            "device": "cpu"
        },
        "offload_param": {
            "device": "cpu"
        }
    },
    "gradient_clipping": "auto",
    "train_batch_size": "auto",
    "train_micro_batch_size_per_gpu": "auto",
    "steps_per_print": 2000000
}
```

Deepspeed version: `Version: 0.8.2+9bfee830`

### Expected behavior

```Shell
-
```



Discussion:
cc @SaulLu @stas00 
cc @pacman100 

Resolving patch:
diff --git a/src/accelerate/state.py b/src/accelerate/state.py
--- a/src/accelerate/state.py
+++ b/src/accelerate/state.py
@@ -120,15 +120,7 @@ def __init__(self, cpu: bool = False, **kwargs):
                 ), "DeepSpeed is not available => install it using `pip3 install deepspeed` or build it from source"
                 self.distributed_type = DistributedType.DEEPSPEED
                 if not torch.distributed.is_initialized():
-                    from .utils import compare_versions
-
-                    self.backend = "nccl"
-                    if compare_versions("deepspeed", ">", "0.6.5"):
-                        from deepspeed import comm as dist
-
-                        dist.init_distributed(dist_backend=self.backend)
-                    else:
-                        torch.distributed.init_process_group(backend="nccl", **kwargs)
+                    torch.distributed.init_process_group(backend="nccl", **kwargs)
 
                 self.num_processes = torch.distributed.get_world_size()
                 self.process_index = torch.distributed.get_rank()


Test patch: