Hi,
I’m a beginner so bear with me. The issue I have is that whatever I do, I cannot get the latest version of MLAgents in my project. But that’s my interpretation of what’s happening, so I’m asking for your input.
The actual problem I’m facing is that I cannot implement the CollectObservations(VectorSensor sensor) method as shown in the guide. Assets\Scripts\CarAgent.cs(61,46): error CS0246: The type or namespace name 'VectorSensor' could not be found (are you missing a using directive or an assembly reference?)
and Assets\Scripts\CarAgent.cs(61,26): error CS0115: 'CarAgent.CollectObservations(VectorSensor)': no suitable method found to override
are the errors I’m getting.
Any ideas?
Hi,
This part of the documentation just changed on master yesterday; my guess is that your version of the code is older. Can you tell me what “k_ApiVersion” in Academy.cs is?
I did clone the repo with the --latest-release argument, as instructed in the guide, no luck there.
I am now working on the 0.14 release which I manually downloaded, so api version is 0.14. The version in the link you sent me though says 0.13. I guess what I need is v0.15?
Hi, I downloaded the newest version for the API and the “vector sensor” error got fixed.
Problem is, when I try to train my agent using “mlagents-learn config/config.yaml --run-id=RollerBall-1 --train” I get that the API from the new version and from python don’t match, which makes sense.
ERROR LOG:
The API number is not compatible between Unity and python. "
mlagents_envs.exception.UnityEnvironmentException: The API number is not compatible between Unity and python. Python API: API-13, Unity API: API-15-dev0.
Where I can get the latest version for python?
Thanks in advance.
I fixed that by installing mlagents for development, as shown in the guide, because the default “pip3 install mlagents” downloads from here, and it only goes up to 0.13.
Hi, Thanks for the answer.
I did that which indeed it does update them to the 0.15 version. The problem I have is that, after doing that, if I try to run the code “mlagents-learn config/myTrainer.yaml --run-id=RollerBall-1 --train” from the environment. It outputs this error (image attached) .
Any ideas how I could fix this?
Thanks in advance.
EDIT: Similar error happens if I just try mlagents-learn --help, now it just outputs errors rather than showing the right output.
Mixmix - 0.14.0 is not released yet (the branch you see is to get the release ready). We set the version on master to 0.15.0.dev0 after we branched for the 0.14.0 release. If you see “dev” on a version, it means you’re working from master and not an official release.
I strongly recommend that you
Install mlagents==0.13.1 from pip (and same for mlagents-envs)
Hi Guys, I’m working with 0.14.1 ml-agents and the penguin demo. I can’t seem to get around the PenguinAcademy override of InitializeAcademy() in the Academy.cs script. I didn’t find anything in the migration notes. Does anyone have a quick fix for this?