# Jupyter notebook hangs when creating TrainingArguments

**URL:** <https://discuss.huggingface.co/t/jupyter-notebook-hangs-when-creating-trainingarguments/57523>\
**Category:** 🤗Transformers\
**Created:** [October 5, 2023, 4:36pm UTC](https://discuss.huggingface.co/t/jupyter-notebook-hangs-when-creating-trainingarguments/57523 "2023-10-05T16:36:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kllisre](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@kllisre](https://discuss.huggingface.co/u/kllisre)\
**Post date:** [October 5, 2023, 4:36pm UTC](https://discuss.huggingface.co/t/jupyter-notebook-hangs-when-creating-trainingarguments/57523/1 "2023-10-05T16:36:53Z")

</div>

Hello, when I use the TrainingArguments my notebook freezes permanently.

```auto
from transformers import TrainingArguments

training_args = TrainingArguments(
    output_dir="./checkpoints",
    learning_rate=2e-5,
    per_device_train_batch_size=4,
    per_device_eval_batch_size=4,
    num_train_epochs=2,
    weight_decay=0.01,
    evaluation_strategy="epoch",
    save_strategy="epoch",
    load_best_model_at_end=True
)

```

The previous code runs without problems.

nvidia-smi:

```auto
Thu Oct 5 16:25:58 2023       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.125.06 Driver Version: 525.125.06 CUDA Version: 12.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... Off | 00000000:01:00.0 Off | N/A |
| 0% 32C P8 16W / 250W | 16MiB / 11264MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
+-----------------------------------------------------------------------------+

```

transformers[torch]==4.34.0

The [same issue](https://discuss.huggingface.co/t/program-hangs-when-creating-a-transformers-trainingarguments-object/39156)
