# End\_training() after evaluation

**URL:** <https://discuss.huggingface.co/t/end-training-after-evaluation/22111>\
**Category:** 🤗Accelerate\
**Created:** [August 25, 2022, 4:22pm UTC](https://discuss.huggingface.co/t/end-training-after-evaluation/22111 "2022-08-25T16:22:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aclifton314](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/aclifton314/32/55465_2.png) [@aclifton314](https://discuss.huggingface.co/u/aclifton314)\
**Post date:** [August 25, 2022, 4:22pm UTC](https://discuss.huggingface.co/t/end-training-after-evaluation/22111/1 "2022-08-25T16:22:26Z")

</div>

I am using `accelerate` for a training loop followed by an evaluation loop. before these loops, I instantiate a `wandb` tracker through `accelerate`. After the evaluation loop, I log the results to the `wandb` tracker. Is it recommended to call `accelerator.end_training()` after logging everything from the evaluation loop to `wandb` or directly after the training loop?

---

<div class="post-metadata">

**Author:** ![muellerzr](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/muellerzr/32/21583_2.png) [@muellerzr](https://discuss.huggingface.co/u/muellerzr)\
**Post date:** [August 25, 2022, 4:23pm UTC](https://discuss.huggingface.co/t/end-training-after-evaluation/22111/2 "2022-08-25T16:23:26Z")

</div>

> [@aclifton314](#):
>
> `accelerator.end_training()` after logging everything from the evaluation loop to `wandb` or directly after the training loop?

It should be the last thing done in your script as it will close all the experiment trackers

---

<div class="post-metadata">

**Author:** ![aclifton314](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/aclifton314/32/55465_2.png) [@aclifton314](https://discuss.huggingface.co/u/aclifton314)\
**Post date:** [August 25, 2022, 4:25pm UTC](https://discuss.huggingface.co/t/end-training-after-evaluation/22111/3 "2022-08-25T16:25:14Z")

</div>

@muellerzr perfect! Thank you!
