I’m working on a project, and during each training session, no matter what, around 30 minutes in, I get the “Fewer observations made than vector observation size. The observations will be padded” error. I don’t see anything wrong with the code, and have no idea what’s causing this especially since it occurs 30 minutes in. Any ideas?
This warning means that during execution of your CollectObservations method, you provide fewer observations with AddObservation than you specified as the vector observation size of your agent in the inspector in Unity.
Yep, but I’m confused about why this is happening, as this error only pops up 30 minutes into training. I’m confused on what’s suddenly causing fewer observations to be sent, after 30 minutes of it working fine.
This never happened to me, so without any further information (such as the code in your CollectObservations method) I’m afraid it’s hard to diagnose your problem. Are there any conditionals in the method? Try to debug your CollectObservations method (e.g. with debug statements) to find out what’s going wrong, in which cases it does not add all observations it should add, and which observations are missing.
Here are my 2 scripts.
https://pastebin.com/AZC23wTN
https://pastebin.com/0rk2p5CH
I’ve been looking at them for days, and I can’t find anything that could cause the problem. However, On one run I got an error saying the ball rigidbody had been destroyed, but I can’t find anything in the scripts that would have destroyed it. I really don’t understand what’s causing this issue.
It’s possible that one of the observations from the ball is empty if the ball is being destroyed. You could check to make sure that the observations from the ball have the same size at every step.
yea, that’s my guess, but I have no idea why the ball is getting destroyed. If you look at my scripts, it should not be getting destroyed at any point.