# Disable checkpointing in Trainer

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdisable-checkpointing-in-trainer%2F2335%3E%5C
**Category:** 🤗Transformers\
**Created:** [November 27, 2020, 10:22pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdisable-checkpointing-in-trainer%2F2335 "2020-11-27T22:22:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lewtun](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/lewtun/32/30995_2.png) [@lewtun](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Flewtun)%5C
**Post date:** [November 27, 2020, 10:22pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdisable-checkpointing-in-trainer%2F2335%2F1 "2020-11-27T22:22:15Z")

</div>

Hi folks,

When I am running a lot of quick and dirty experiments, I do not want / need to save any models as I’m usually relying on the metrics from the [`Trainer`](https://huggingface.co/transformers/main_classes/trainer.html?highlight=trainer#trainer) to guide my next decision.

One thing that slows down my iteration speed is the fact that the Trainer will save a checkpoint after some number of steps, defined by the `save_steps` parameter in [`TrainingArguments`](https://huggingface.co/transformers/main_classes/trainer.html?highlight=trainer#trainingarguments).

To disable checkpointing, what I currently do is set `save_steps` to some large number, but my question is whether there is a more elegant way to do this? For example, is there a Trainer argument I can set that will disable checkpointing altogether?

Thanks!

---

<div class="post-metadata">

**Author:** ![sgugger](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/sgugger/32/2291_2.png) [@sgugger](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsgugger)%5C
**Post date:** [November 30, 2020, 2:04pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdisable-checkpointing-in-trainer%2F2335%2F2 "2020-11-30T14:04:38Z")

</div>

There is none for now. We could definitely add a `save_strategy` like the `evaluation_strategy` that could take the values no/steps/epoch.  
If you want to tackle this in a PR that would be a welcome contribution!

---

<div class="post-metadata">

**Author:** ![lewtun](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/lewtun/32/30995_2.png) [@lewtun](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Flewtun)%5C
**Post date:** [November 30, 2020, 2:18pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdisable-checkpointing-in-trainer%2F2335%2F3 "2020-11-30T14:18:10Z")

</div>

Thanks for the info! Sure I am happy to tackle this in a PR - will report back when it’s ready 🙂

---

<div class="post-metadata">

**Author:** ![Gladiator](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/gladiator/32/17490_2.png) [@Gladiator](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FGladiator)%5C
**Post date:** [January 2, 2022, 9:54am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdisable-checkpointing-in-trainer%2F2335%2F4 "2022-01-02T09:54:15Z")

</div>

Is this solved now? Is there any way to disable checkpointing or do we have to set the `save_steps` to a large number to disable checkpointing even now?

---

<div class="post-metadata">

**Author:** ![sgugger](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/sgugger/32/2291_2.png) [@sgugger](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsgugger)%5C
**Post date:** [January 10, 2022, 3:45pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdisable-checkpointing-in-trainer%2F2335%2F5 "2022-01-10T15:45:37Z")

</div>

You can use `save_strategy="no"`.
