# Continue training after finishing first run

**URL:** <https://discuss.ray.io/t/continue-training-after-finishing-first-run/2478>\
**Category:** RLlib\
**Created:** [June 10, 2021, 2:16am UTC](https://discuss.ray.io/t/continue-training-after-finishing-first-run/2478 "2021-06-10T02:16:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![geekyneuro](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/geekyneuro/32/964_2.png) [@geekyneuro](https://discuss.ray.io/u/geekyneuro)\
**Post date:** [June 10, 2021, 2:16am UTC](https://discuss.ray.io/t/continue-training-after-finishing-first-run/2478/1 "2021-06-10T02:16:12Z")

</div>

Let us say I have trained the RL model for 1000 episodes with tune.run(), how do I tell Ray to continue training for another 1000 episodes?

I have tried passing resume=True, which resumes the experiment but then exits instead of training for another 1000 episodes even after giving stop criteria to 2000 episodes.

---

<div class="post-metadata">

**Author:** ![sven1977](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/sven1977/32/53_2.png) [@sven1977](https://discuss.ray.io/u/sven1977)\
**Post date:** [June 11, 2021, 9:30am UTC](https://discuss.ray.io/t/continue-training-after-finishing-first-run/2478/2 "2021-06-11T09:30:52Z")

</div>

Hey @geekyneuro , maybe there is another stopping criteria that kicks in? Like reward or training iterations or so?

---

<div class="post-metadata">

**Author:** ![geekyneuro](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/geekyneuro/32/964_2.png) [@geekyneuro](https://discuss.ray.io/u/geekyneuro)\
**Post date:** [June 11, 2021, 11:53am UTC](https://discuss.ray.io/t/continue-training-after-finishing-first-run/2478/3 "2021-06-11T11:53:25Z")

</div>

There isn’t any other stopping criteria set explicitly in the config file. Only the episodes.\_total

Sincerely

Armando

---

<div class="post-metadata">

**Author:** ![mannyv](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/mannyv/32/606_2.png) [@mannyv](https://discuss.ray.io/u/mannyv)\
**Post date:** [June 14, 2021, 11:32am UTC](https://discuss.ray.io/t/continue-training-after-finishing-first-run/2478/4 "2021-06-14T11:32:12Z")

</div>

Hi @geekyneuro,

Have you tried using restore without resume? I am not sure exactly how you are using it but I have found that if I use tune to run trials and it finishes them then it will mark it as “Terminated” which means it finished normally. When you try to resume a run that has “Terminated” it will finish immediately you can not continue trainng. I think what you want to use here is restore.
