# Trainer saving checkpoints even when 'save\_strategy' is set to 'no'

**URL:** <https://discuss.huggingface.co/t/trainer-saving-checkpoints-even-when-save-strategy-is-set-to-no/36925>\
**Category:** 🤗Transformers\
**Created:** [April 18, 2023, 4:50am UTC](https://discuss.huggingface.co/t/trainer-saving-checkpoints-even-when-save-strategy-is-set-to-no/36925 "2023-04-18T04:50:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Od-Lanir](https://avatars.discourse-cdn.com/v4/letter/o/e274bd/32.png) [@Od-Lanir](https://discuss.huggingface.co/u/Od-Lanir)\
**Post date:** [April 18, 2023, 4:50am UTC](https://discuss.huggingface.co/t/trainer-saving-checkpoints-even-when-save-strategy-is-set-to-no/36925/1 "2023-04-18T04:50:10Z")

</div>

When I run a ‘trainer.hyperparameter\_search()’ with training arguments “evaluation\_strategy=epoch” and “save\_strategy=no”, then no checkpoints are saved as expected. When I change the evaluation strategy to ‘steps’ this invokes a ‘modelCheckpoint’ callback which saves a checkpoint even with “save\_strategy=no”.

I’m not sure if I am confused about evaluations but why does evaluation need a saved checkpoint when evaluating across steps but not when on epochs?

---

<div class="post-metadata">

**Author:** ![Od-Lanir](https://avatars.discourse-cdn.com/v4/letter/o/e274bd/32.png) [@Od-Lanir](https://discuss.huggingface.co/u/Od-Lanir)\
**Post date:** [April 18, 2023, 10:38am UTC](https://discuss.huggingface.co/t/trainer-saving-checkpoints-even-when-save-strategy-is-set-to-no/36925/2 "2023-04-18T10:38:02Z")

</div>

I was silly and was running my ‘eval\_step’ size larger than the total steps possible. 😕
