Repository: huggingface/accelerate

Issue:
SageMaker config TypeError
### System Info

```Shell
- `Accelerate` version: 0.22.0
- Platform: Linux-5.10.184-175.731.amzn2.x86_64-x86_64-with-glibc2.26
- Python version: 3.10.8
- Numpy version: 1.25.2
- PyTorch version (GPU?): 2.0.1+cu117 (False)
- PyTorch XPU available: False
- PyTorch NPU available: False
```


### Information

- [x] The official example scripts
- [ ] 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`)
- [ ] My own task or dataset (give details below)

### Reproduction

1. Install accelerate[sagemaker]
2. run `accelerate config`
3. Go through the configuration process

The result will be:
```
Traceback (most recent call last):                                                                                                                                                                                                                                            
  File "/home/ec2-user/anaconda3/envs/JupyterSystemEnv/bin/accelerate", line 8, in <module>                                                                                                                                                                                   
    sys.exit(main())                                                                                                                                                                                                                                                          
  File "/home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.10/site-packages/accelerate/commands/accelerate_cli.py", line 45, in main                                                                                                                                  
    args.func(args)
  File "/home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.10/site-packages/accelerate/commands/config/config.py", line 67, in config_command
    config = get_user_input()
  File "/home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.10/site-packages/accelerate/commands/config/config.py", line 38, in get_user_input
    config = get_sagemaker_input()
  File "/home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.10/site-packages/accelerate/commands/config/sagemaker.py", line 243, in get_sagemaker_input
    return SageMakerConfig(
TypeError: SageMakerConfig.__init__() missing 1 required positional argument: 'debug'
```

### Expected behavior

accelerate config works


Discussion:

Resolving patch:
diff --git a/src/accelerate/commands/config/sagemaker.py b/src/accelerate/commands/config/sagemaker.py
--- a/src/accelerate/commands/config/sagemaker.py
+++ b/src/accelerate/commands/config/sagemaker.py
@@ -221,6 +221,15 @@ def get_sagemaker_input():
         ec2_instance_query += "? [ml.p3.2xlarge]:"
         ec2_instance_type = _ask_field(ec2_instance_query, lambda x: str(x).lower(), default="ml.p3.2xlarge")
 
+    debug = False
+    if distributed_type != SageMakerDistributedType.NO:
+        debug = _ask_field(
+            "Should distributed operations be checked while running for errors? This can avoid timeout issues but will be slower. [yes/NO]: ",
+            _convert_yes_no_to_bool,
+            default=False,
+            error_message="Please enter yes or no.",
+        )
+
     num_machines = 1
     if distributed_type in (SageMakerDistributedType.DATA_PARALLEL, SageMakerDistributedType.MODEL_PARALLEL):
         num_machines = _ask_field(
@@ -254,4 +263,5 @@ def get_sagemaker_input():
         num_machines=num_machines,
         sagemaker_inputs_file=sagemaker_inputs_file,
         sagemaker_metrics_file=sagemaker_metrics_file,
+        debug=debug,
     )


Test patch: