Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GridSensor shape mismatch #4456

Closed
mbaske opened this issue Sep 4, 2020 · 9 comments
Closed

GridSensor shape mismatch #4456

mbaske opened this issue Sep 4, 2020 · 9 comments
Assignees
Labels
bug Issue describes a potential bug in ml-agents.

Comments

@mbaske
Copy link

mbaske commented Sep 4, 2020

Describe the bug
I'm trying to retrain the GridFoodCollector demo and get a python error indicating a wrong observation shape.
I think the sensor observes 6 channels, while the PNG-compressed data only has 3.

Console logs / stack traces
mlagents_envs.exception.UnityObservationException: Decompressed observation did not have the expected shape - decompressed had (40, 40, 3) but expected [40, 40, 6]

Environment (please complete the following information):

  • Unity Version: 2020.1.4f1
  • Windows 10
  • ML-Agents C# from master branch
  • ML-Agent python 0.19.0
@mbaske mbaske added the bug Issue describes a potential bug in ml-agents. label Sep 4, 2020
@surfnerd surfnerd self-assigned this Sep 4, 2020
@surfnerd
Copy link
Contributor

surfnerd commented Sep 8, 2020

hi @mbaske,
I am unable to reproduce your issue. Can you give me more information?

@surfnerd
Copy link
Contributor

surfnerd commented Sep 8, 2020

i used mlagents-learn ./config/ppo/FoodCollector.yaml to run my training session.

@surfnerd
Copy link
Contributor

surfnerd commented Sep 8, 2020

Hi @mbaske,
Did you happen to update the python package when you tried out these changes?

@surfnerd
Copy link
Contributor

surfnerd commented Sep 8, 2020

We will need to bump the communication minor version as this feature was recently added.

@mbaske
Copy link
Author

mbaske commented Sep 8, 2020

Hi @surfnerd, here is my version info:
ml-agents: 0.19.0,
ml-agents-envs: 0.19.0,
Communicator API: 1.0.0,
TensorFlow: 2.2.0
Do I need to upgrade any of this?

@surfnerd
Copy link
Contributor

surfnerd commented Sep 8, 2020

Yes, you will need to install the python packages from master.

@surfnerd
Copy link
Contributor

surfnerd commented Sep 8, 2020

from the root directory of the repo:

$ python3 -m pip install -e ./ml-agents-envs/
$ python3 -m pip install -e ./ml-agents/

@mbaske
Copy link
Author

mbaske commented Sep 8, 2020

Thank you!
I updated the python files and I'm not getting the UnityObservationException any longer.

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue describes a potential bug in ml-agents.
Projects
None yet
Development

No branches or pull requests

2 participants