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

Loader is deprecated #2127

Closed MrGitGo closed 5 years ago

MrGitGo commented 5 years ago

I am running this command: mlagents-learn config/trainer_config.yaml --run-id=Lernen_1_0 --train --load and I get this:

lib\site-packages\mlagents\trainers\learn.py:141: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  trainer_config = yaml.load(data_file)

I looked on the page and there is written that I should run this: PYTHONWARNINGS=ignore::yaml.YAMLLoadWarning

or

yaml.load(input, Loader=yaml.FullLoader)

which one should I run and will this stop the warning to appear? Or do I have to run other commands?

chriselion commented 5 years ago

I actually just made a PR to fix this yesterday: https://github.com/Unity-Technologies/ml-agents/pull/2124 . Should have it merged today and in the next release.

shihzy commented 5 years ago

Closing the issue as it appears to have been addressed.

chriselion commented 5 years ago

Yeah, I forgot to close this when 0.8.2 was released - that contains the fix.

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.