# End\_training() after evaluation

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fend-training-after-evaluation%2F22111%3E%5C
**Category:** 🤗Accelerate\
**Created:** [August 25, 2022, 4:22pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fend-training-after-evaluation%2F22111 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Faclifton314)%5C
**Post date:** [August 25, 2022, 4:22pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fend-training-after-evaluation%2F22111%2F1 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmuellerzr)%5C
**Post date:** [August 25, 2022, 4:23pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fend-training-after-evaluation%2F22111%2F2 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Faclifton314)%5C
**Post date:** [August 25, 2022, 4:25pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fend-training-after-evaluation%2F22111%2F3 "2022-08-25T16:25:14Z")

</div>

@muellerzr perfect! Thank you!
