Search code examples
reinforcement-learningstable-baselines

StableBaslines3 PPO model train() freezes?


I'm trying to have my RL model play a game, but I've encountered a peculiar problem.

I am kind of new to all this, so maybe it's stupid, but:

My environment and everything are set up nicely and when testing works like a charm. I can see the inputs the model makes and the data it receives.

The issue is that after model.learn() the script just freezes. Now I tried removing the model.train() line and in that case, it follows through and finishes, although of course untrained.

I don't see anyone talking about implementing the train() function, but when I look at it it seems empty and unimplemented. Is this normal? Do I have to build the train() function myself?

Thanks in advance, if you need any code let me know. But I think the problem lies in my understanding?


Solution

  • Alright, the issue seems resolved and u did indeed point me in the right direction. Because of how I setup my script and environment I was accidentally starting multiple, leading to edging on my preformance, making the calculations extremely slow. It now finishes cleanly within appropriate time.