What happens to the learning of a brain if I stop training it?

Contributor

Hi everybody,

In my case, I am training an unmanaged brain, specifically I am working from my local machine with python. So, suppose I am in a training session, and I stop the training, either by pressing the Stop button in Bonsai UI or by pressing CTRL C in the simulator on my local machine.
My question is: The next time I go to train the same brain, does the training start from scratch or from the knowledge had acquired up to the moment the previous training session was stopped?

2 Replies
The Bonsai platform retains the partially-trained policy and will pick up training from that point. However, the current episode will be discarded. Plus, if you stop training (as opposed to just restarting your sim(s) and continuing training), you will also lose the in-memory "replay buffer" which stores recent episode trajectories and helps train the policy more rapidly.

We don't recommend training a brain from unmanaged sims. The "unmanaged sim" feature is designed for helping you debug your sim initially. Once you have confidence that the sim is working as intended, you should package it into a docker container and upload it to the cloud so Bonsai can instantiate, scale, and manage many instances of your sim.
Perfect, thanks Erictr. I see that I have to work with docker containers