Unity-Technologies / ml-agents

The Unity Machine Learning Agents Toolkit (ML-Agents) is an open-source project that enables games and simulations to serve as environments for training intelligent agents using deep reinforcement learning and imitation learning.
https://unity.com/products/machine-learning-agents
Other
17.19k stars 4.16k forks source link

NullReferenceException: Object reference not set to an instance of an object during Training. #2464

Closed marbrink closed 5 years ago

marbrink commented 5 years ago

During training I sometimes get this repeating error in my console and the agent doesn't do anything anymore. It happens seamingly at random, sometimes after 20k steps, sometimes after 200k steps sometimes not at all. I've had it happen in my self-designed environment and I've had this happen in example environments, i.e. just now it happened in the "Hallway"-Environment. I'm on ml-agents 0.81.

The complete error is as follows: NullReferenceException: Object reference not set to an instance of an object MLAgents.Academy.EnvironmentStep () (at Assets/ML-Agents/Scripts/Academy.cs:579) MLAgents.Academy.FixedUpdate () (at Assets/ML-Agents/Scripts/Academy.cs:655)

cgiles commented 5 years ago

Did you modified and saved some scripts as the training was ongoing ?

If yes, it's what caused this error.

You can always restart the training where it stopped by adding --load when you relaunch your training in the python/anaconda window. Just place it before the --training.

yakmyakmyakm commented 5 years ago
Screen Shot 2019-09-10 at 7 02 24 PM

I believe I have ran into the same issue. I left my computer idle for a few hours and when I came back I got this error.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had activity in the last 14 days. It will be closed in the next 14 days if no further activity occurs. Thank you for your contributions.

droidXrobot commented 5 years ago

I also get NullReferenceException: Object reference not set to an instance of an object when trying to run the hallway example.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had activity in the last 14 days. It will be closed in the next 14 days if no further activity occurs. Thank you for your contributions.

stale[bot] commented 5 years ago

This issue has been automatically closed because it has not had activity in the last 28 days. If this issue is still valid, please ping a maintainer. Thank you for your contributions.

github-actions[bot] commented 3 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.