# How to continually update a model with new data

**URL:** <https://discuss.dvc.org/t/how-to-continually-update-a-model-with-new-data/1055>\
**Category:** Questions\
**Created:** [February 10, 2022, 6:01pm UTC](https://discuss.dvc.org/t/how-to-continually-update-a-model-with-new-data/1055 "2022-02-10T18:01:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ayeright](https://avatars.discourse-cdn.com/v4/letter/a/90ced4/32.png) [@ayeright](https://discuss.dvc.org/u/ayeright)\
**Post date:** [February 10, 2022, 6:01pm UTC](https://discuss.dvc.org/t/how-to-continually-update-a-model-with-new-data/1055/1 "2022-02-10T18:01:09Z")

</div>

I have a reinforcement learning use case with the following initial steps:

1. Construct initial episodes
2. Add episodes to initial experience replay buffer
3. Train initial model

Then the following steps which repeat every day:

1. Construct most recent time steps
2. Add new time steps to existing experience replay buffer
3. Fine-tune existing model
4. Compare existing model and fine-tuned model and keep the one that’s best

What would be the best way to do this using DVC? Is it even possible given that circular dependencies are not allowed?

---

<div class="post-metadata">

**Author:** ![dberenbaum](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@dberenbaum](https://discuss.dvc.org/u/dberenbaum)\
**Post date:** [February 11, 2022, 1:35am UTC](https://discuss.dvc.org/t/how-to-continually-update-a-model-with-new-data/1055/2 "2022-02-11T01:35:31Z")

</div>

You can use `persist: true` to prevent outputs from being deleted during stage execution (see [https://dvc.org/doc/command-reference/repro#description](https://dvc.org/doc/command-reference/repro#description)), so you can feed in new data each day and have the subsequent stages read from their existing outputs before writing out newly modified versions.

---

<div class="post-metadata">

**Author:** ![ayeright](https://avatars.discourse-cdn.com/v4/letter/a/90ced4/32.png) [@ayeright](https://discuss.dvc.org/u/ayeright)\
**Post date:** [February 14, 2022, 5:10pm UTC](https://discuss.dvc.org/t/how-to-continually-update-a-model-with-new-data/1055/3 "2022-02-14T17:10:19Z")

</div>

Thanks! I think that should work
