Repository: huggingface/accelerate
Issue category: Bug Report

[BUG] Accelerator.__init__() got an unexpected keyword argument 'logging_dir'
### System Info

```Shell
accelerate version: main
python version: 3.11
torch version: 2.4
numpy version: 1.26.4
```


### Information

- [X] The official example scripts
- [ ] My own modified scripts

### Tasks

- [X] 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

When I run the accelerate/examples/megatron_1m_gpt_pretraining. py file 
accelerate launch --config_file megatron_gpt_pretraining.py \
--config_name "gpt2-large" \
--tokenizer_name "gpt2-large" \
--dataset_name wikitext \
--dataset_config_name wikitext-2-raw-v1 \
--block_size 1024 \
--learning_rate 5e-5 \
--per_device_train_batch_size 24 \
--per_device_eval_batch_size 24 \
--num_train_epochs 5 \
--with_tracking \
--report_to "wandb" \
--output_dir "awesome_model"

### Expected behavior

Normal training, but I found that in megatron_1m_gpt_pretraining on line 255 of the py file, there is an undefined parameter 'logging.dir' in the __init__ method of the Accelerator function
[BUG] Accelerator.__init__() got an unexpected keyword argument 'logging_dir'
### System Info

```Shell
accelerate version: main
python version: 3.11
torch version: 2.4
numpy version: 1.26.4
```


### Information

- [X] The official example scripts
- [ ] My own modified scripts

### Tasks

- [X] 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

When I run the accelerate/examples/megatron_1m_gpt_pretraining. py file 
accelerate launch --config_file megatron_gpt_pretraining.py \
--config_name "gpt2-large" \
--tokenizer_name "gpt2-large" \
--dataset_name wikitext \
--dataset_config_name wikitext-2-raw-v1 \
--block_size 1024 \
--learning_rate 5e-5 \
--per_device_train_batch_size 24 \
--per_device_eval_batch_size 24 \
--num_train_epochs 5 \
--with_tracking \
--report_to "wandb" \
--output_dir "awesome_model"

### Expected behavior

Normal training, but I found that in megatron_1m_gpt_pretraining on line 255 of the py file, there is an undefined parameter 'logging.dir' in the __init__ method of the Accelerator function


Functions to edit:
examples/by_feature/megatron_lm_gpt_pretraining.py:main

Patch:
diff --git a/examples/by_feature/megatron_lm_gpt_pretraining.py b/examples/by_feature/megatron_lm_gpt_pretraining.py
index 18488ec41e2..c9d4787ed83 100644
--- a/examples/by_feature/megatron_lm_gpt_pretraining.py
+++ b/examples/by_feature/megatron_lm_gpt_pretraining.py
@@ -252,7 +252,7 @@ def main():
 
     if args.with_tracking:
         accelerator_log_kwargs["log_with"] = args.report_to
-        accelerator_log_kwargs["logging_dir"] = args.output_dir
+        accelerator_log_kwargs["project_dir"] = args.output_dir
 
     accelerator = Accelerator(gradient_accumulation_steps=args.gradient_accumulation_steps, **accelerator_log_kwargs)