# Is the Trainer supposed to be saving checkpoints for every process?

**URL:** <https://discuss.huggingface.co/t/is-the-trainer-supposed-to-be-saving-checkpoints-for-every-process/98459>\
**Category:** Beginners\
**Created:** [July 20, 2024, 9:03am UTC](https://discuss.huggingface.co/t/is-the-trainer-supposed-to-be-saving-checkpoints-for-every-process/98459 "2024-07-20T09:03:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![seanswyi](https://avatars.discourse-cdn.com/v4/letter/s/6f9a4e/32.png) [@seanswyi](https://discuss.huggingface.co/u/seanswyi)\
**Post date:** [July 20, 2024, 9:03am UTC](https://discuss.huggingface.co/t/is-the-trainer-supposed-to-be-saving-checkpoints-for-every-process/98459/1 "2024-07-20T09:03:17Z")

</div>

I’m noticing that when using the HF Trainer, the Trainer object doesn’t seem to check for main process using the Accelerator. This was a little counterintuitive because I thought that using something like [`accelerator.wait_for_everyone()`](https://huggingface.co/docs/accelerate/en/package_reference/accelerator#accelerate.Accelerator.wait_for_everyone) was recommended.

Is this intentional? Or am I misunderstanding something?

Thanks.

ref: [transformers/src/transformers/trainer.py at 0fdea8607d7e01eb0e38a1ebeb7feee30a22f0cf · huggingface/transformers · GitHub](https://github.com/huggingface/transformers/blob/0fdea8607d7e01eb0e38a1ebeb7feee30a22f0cf/src/transformers/trainer.py#L3499)
