# My Ray programs stops learning when using distributed compute

**URL:** <https://discuss.ray.io/t/my-ray-programs-stops-learning-when-using-distributed-compute/7005>\
**Category:** RLlib\
**Created:** [July 28, 2022, 6:20pm UTC](https://discuss.ray.io/t/my-ray-programs-stops-learning-when-using-distributed-compute/7005 "2022-07-28T18:20:21Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Stefan-1313](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/stefan-1313/32/2051_2.png) [@Stefan-1313](https://discuss.ray.io/u/Stefan-1313)\
**Post date:** [August 1, 2022, 11:58am UTC](https://discuss.ray.io/t/my-ray-programs-stops-learning-when-using-distributed-compute/7005/9 "2022-08-01T11:58:04Z")

</div>

Hi Mannyv,

Lars already thanked you for your extremely detailed answer here: [Read Tune console output from Simple Q - #5 by mannyv](https://discuss.ray.io/t/read-tune-console-output-from-simple-q/3845/5) But I would like to thank you again. It is extremely clearifying. Funny how I struggly with almost the same concepts as @Lars_Simon_Zehnder :).

Regarding the complete\_episodes.  
There is no specific reason I need this. I was afraid the agent would only learn the first `rollout_fragment_length` steps perfectly and can’t see further in the episodes.  
Such an implementation off course would make little sense.

Is this how it works: After a worker has sampled the `rollout_fragment_length` steps, and start a new fragment, will it continue the episode where it stopped the previous fragment? So in this example at the second iteration, will it start/continue at step 5? Then I can just as well use `truncate_episodes`.

So I tried using config\_simple[“batch\_mode”] =“truncate\_episodes”. I can confirm this even improves the learning for my case (quite a lot)! I don’t exactly understand why it makes such a difference though. Do you have any thoughts on it?

---

_[View the full topic](https://discuss.ray.io/t/my-ray-programs-stops-learning-when-using-distributed-compute/7005)._
