Error while loading a model with MLAgents

Hello everyone,

I am trying to develop an agent to play my game for a school project and i decided to use MLAgents.

I think that my scripts are okay, the learning process goes pretty well, the agent’s behaviour changes with time. But when I try to load the generated model, I get this error message :

UnityAgentsException Unknown tensorProxy expected as input : obs_0

I don’t really understand the script from which the error is thrown so I don’t know how to fix it…

Could anyone help me understand my problem ?

2 Likes

Getting same issue when using model

EDIT: Fixed via updating the MLAgents plugin to latest version available

1 Like

I was also having this issue. For me the latest version of ML-agent for Unity available in the packet manager was different from the latest version for Python. As I was using v1.9.1 in Unity, I had to install v0.25.1 using pip.

python -m pip install mlagents==0.25.1

Hi @Celestin74 ,
Could you help us out by giving us the following information:

Unity Editor Version:
com.unity.ml-agents (c# package) version:
mlagents pip version:
Operating System:
Operating System Version:

Thank you.

I’m having the same problem

I’m also having this problem

1 Like

Same here

1 Like

Hey all, could you please provide the information that @christophergoy requested. This will help with the troubleshooting process.

Same error

1 Like

Hi mate,

I have same problem; here is my information
Unity Editor Version:2019.4.25f1
com.unity.ml-agents (c# package) version: MLAgents 1.9.1-pre (I get this information by my Package Manager in Unity. If not correct please let me know)
mlagents pip version: mlagents 0.28.0.dev0 (I get this information by checking my current conda list. if not current please let me know)
Operating System:Mac OS Big Sur 11.4
Operating System Version:Mac OS Big Sur 11.4
If you have any further request please let me know. Thanks for your help!!

1 Like

Had the same problem, but I saw this Releases · Unity-Technologies/ml-agents · GitHub

I had version 1.9.1 for unity package but 27.0 for python. Had to download 2.1 preview for Unity.

On each release there is a Note that says they encourage to download the packages from the same release.

Hi mate, I do not quite understand that. I download the Ml-agent package from the package manager implemented in Unity. It does not be limited by any release version 0.0;

Hi @XRR422 ,
Please update your ml-agents unity package. @unity_GELnPKgBkcda0g is correct. If you look at the github release page there are tables for all of the versions that work together. Please reference this next time. According to our own release page, the last release was Release 18. The unity package was at version 2.1.0-exp.1, and the python package at 0.27.0.

You have an out-of-date unity package that was bumped up a major version and does not work with the version of python that you are using.

Thank you Christophergoy and @unity_GELnPKgBkcda0g . It solves my problem after I update my python package to 0.27.0, and update mlagent to 2.1.0-exp.1 .

Thanks to all, I had the same Issue and updating python + mlagents to those versions solved it for me!

Hi, can anyone tell me how to make this updates? I’m having trouble to update my python package and mlagents

1 Like

Absolutely, Seems like compatibility errors and nothing more

You can update in the command prompt inside the venv the mlagents using pip
Then using the package manager choose the highest ver.