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
16.93k stars 4.14k forks source link

AttributeError: 'OnlineBCTrainer' object has no attribute 'step' #2496

Closed mnsmuts closed 5 years ago

mnsmuts commented 5 years ago

New installation of 0.9.2 with new conda py env. -using the UnitySDK and running the 3DBall -player brain on one of the agents Learning brain on the rest, academy with two brains (player and learner) Nothing unusual with the setup or command (mlagents-learn config\online_bc_config.yaml --train --slow)

Obviously I changed the brain to imitate line in the default onlineBC yaml file to 3DBallPlayer mlagents0 9 2error

Windows 10 ML-Agents 0.9.2 3DBall

Any ideas?

Just tried 0.9.1 with the hotfix and can get offline training working, then switched back to 0.9.2 and tried the same (with the correct env) and received the attrib error again.

mnsmuts commented 5 years ago

mlagents0 9 2error2 Same error with offline training using the basic model and a demo file.

chriselion commented 5 years ago

Hi @mnsmuts - thanks for the bug report. I think I see the problem, I'll work on a fix today.

chriselion commented 5 years ago

Fixed in https://github.com/Unity-Technologies/ml-agents/pull/2498 - during a refactor, the step initialization got moved to RLTrainer instead of Trainer which explains why it didn't affect PPO training.

We'll work on some more automated testing to make sure there's better coverage on the BC Trainer code.

mnsmuts commented 5 years ago

Many thanks

chriselion commented 5 years ago

We're going to be doing a bugfix release on Monday with the fix for this.

chriselion commented 5 years ago

Version 0.9.3 was released yesterday, which contains the fix for this. I'll close this issue now.

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.