# How to override existing statistics in plot when resuming from a checkpoint?

**URL:** https://community.wandb.ai/t/how-to-override-existing-statistics-in-plot-when-resuming-from-a-checkpoint/3737
**Category:** W&B Help
**Created:** [January 23, 2023, 11:33am UTC](https://community.wandb.ai/t/how-to-override-existing-statistics-in-plot-when-resuming-from-a-checkpoint/3737 "2023-01-23T11:33:23Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![chulabhaya](https://avatars.discourse-cdn.com/v4/letter/c/9dc877/32.png) [@chulabhaya](https://community.wandb.ai/u/chulabhaya)
#### Post date: [January 23, 2023, 11:33am UTC](https://community.wandb.ai/t/how-to-override-existing-statistics-in-plot-when-resuming-from-a-checkpoint/3737/1 "2023-01-23T11:33:23Z")

</div>

Hello all! I’m trying to set up proper training checkpointing and resuming for my code and thus far I’ve gotten things to work but there is still one thing I am trying to figure out, which is how to get the logs in wandb to get overwritten/replaced after I load a checkpoint.

For instance, right now in my code if I save a checkpoint at 5000 timesteps, let training run for a few more thousand timesteps, cancel it, and then load and resume training from that 5000 step checkpoint, a training plot will look like this:

![image](https://us1.discourse-cdn.com/flex020/uploads/wandb/original/2X/0/0fd7c64199202e092516ae6671d3a7ffad419c7f.png)

This is because the built-in Wandb Step value didn’t also reset back to 5k for when I restarted training from the 5k checkpoint, it just kept going. What I would instead like to have happen is that the Step value is synced with when I save the checkpoint so that when I resume, the existing plot is **overridden** , rather than continued. Is it possible to do this? Thanks in advance!

---

<div class="post-metadata">

### Author: ![luis\_bergua](https://avatars.discourse-cdn.com/v4/letter/l/dbc845/32.png) [@luis\_bergua](https://community.wandb.ai/u/luis_bergua)
#### Post date: [January 24, 2023, 10:59am UTC](https://community.wandb.ai/t/how-to-override-existing-statistics-in-plot-when-resuming-from-a-checkpoint/3737/2 "2023-01-24T10:59:31Z")

</div>

Hi @chulabhaya, thanks for your question! If I’m understanding you properly, you’re resuming your run with `wandb.init(id='run_id', resume='allow')` and then trying to override `losses/alpha_loss` with `wandb.log({'losses/alpha_loss':value}, step=x)` where x is an already logged step? If this is the case this isn’t possible now as when you resume a run you can only log from the latest step (or a higher one). I can create a new feature request for this if you want, just explain me your use-case to share the full context with our Product Team. Thanks!

---

<div class="post-metadata">

### Author: ![luis\_bergua](https://avatars.discourse-cdn.com/v4/letter/l/dbc845/32.png) [@luis\_bergua](https://community.wandb.ai/u/luis_bergua)
#### Post date: [January 26, 2023, 2:01pm UTC](https://community.wandb.ai/t/how-to-override-existing-statistics-in-plot-when-resuming-from-a-checkpoint/3737/3 "2023-01-26T14:01:32Z")

</div>

Hi Chulabhaya,

We wanted to follow up with you regarding your support request as we have not heard back from you. Please let us know if we can be of further assistance or if your issue has been resolved.

Best,  
Luis

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex020/uploads/wandb/original/1X/366b649231631dbab896843020da0056074ac79d.png) [@system](https://community.wandb.ai/u/system)
#### Post date: [March 25, 2023, 10:59am UTC](https://community.wandb.ai/t/how-to-override-existing-statistics-in-plot-when-resuming-from-a-checkpoint/3737/4 "2023-03-25T10:59:53Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
