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

Trouble Getting Set Up With ML-Agents Demo #6169

Open
kakiti3 opened this issue Nov 5, 2024 · 7 comments
Open

Trouble Getting Set Up With ML-Agents Demo #6169

kakiti3 opened this issue Nov 5, 2024 · 7 comments
Assignees
Labels
bug Issue describes a potential bug in ml-agents.

Comments

@kakiti3
Copy link

kakiti3 commented Nov 5, 2024

Describe the bug

Hopefully this is the right forum for this. Attempting to run the ml-agents demo and running into some compile errors. After following the installation instructions from the repo, I attempt to run the scene, but encounter the following errors:

  • 'ModelAsset' does not contain a definition for 'modelAssetData' and no accessible extension method...
  • 'ModelAssetData' is inaccessible due to its protection level
  • Creating missing agent component for DevisionRequester in Agent

The scene also has pink agents instead of the textures pictured in the instructions. Figured I might have messed up the install somehow. Any ideas?

To Reproduce
Hard to recommend steps to reproduce since I thought I followed the instructions properly and am trying to figure out what went wrong.

Console logs / stack traces
Please wrap in triple backticks (```) to make it easier to read.

Screenshots
ModelAsset_error

Environment (please complete the following information):

  • Unity Version: Unity 6000.0.25f1
  • OS + version: Mac Sonoma 14.7.1
  • ML-Agents version: latest develop
  • Torch version: n/a
  • Environment: n/a
@kakiti3 kakiti3 added the bug Issue describes a potential bug in ml-agents. label Nov 5, 2024
@MoonCrowned
Copy link

MoonCrowned commented Nov 7, 2024

As for me, just comment these two lines - 307 & 308. I've just started, but after commenting training the 3d balls scene is working.
And dont use development branch - return some commits earlier to release_22_mm branch.

@kakiti3
Copy link
Author

kakiti3 commented Nov 7, 2024

Switched from develop to release_22_mm and commented out lines 307/308 in ModelOverrider.cs. This seems to address the warnings, but not the other errors (ones in red). Were you still getting those after your fix above?

@miguelalonsojr
Copy link
Collaborator

Hmm... you seem to have an outdated version of the repo. I can't repro this on the latest version of the develop branch. Have a look here:

// asset.modelAssetData = ScriptableObject.CreateInstance<ModelAssetData>();
Those lines are already commented.

@miguelalonsojr
Copy link
Collaborator

I also noticed from the screen cap, you're using U6. Can you try the following with U 2023.2?

In the repo:

git checkout develop
git pull
git clean -fxd

This will reset your repo to a freshly cloned state. Then try to open it with 2023.2.

Note: I'll be updating the develop branch to U6 in December.

@kakiti3
Copy link
Author

kakiti3 commented Nov 26, 2024

So I switched over to Unity 2023.2.20f1 (assuming that's the version you were referring to) and reset to a clean version of the develop branch. Ran into the same bugs. Note:

  • Following the instructions from the repo Readme, and after switching versions and resetting the repo, I loaded the ml-agents package from the Package Manager using the "load from disk" option and navigating to ml-agents/com.unity.ml-agents/package.json.
  • It successfully loaded the package, but the sample 3D Ball scene was 0 KB
  • Had the option of loading the scene directly from the project home screen, but when I did it didn't render, instead giving me the same bugs as before

Any thoughts?

@miguelalonsojr
Copy link
Collaborator

This is an issue with the ModelOverrider.cs file, which is only in the repo Project. Can you check your local version of the ModelOverrider.cs file and confirm that lines 305 and 306 are commented out? Also, are you using a fork or a direct clone of the repo?

@miguelalonsojr miguelalonsojr self-assigned this Nov 27, 2024
@kakiti3
Copy link
Author

kakiti3 commented Dec 2, 2024

ModelOverrider.cs:305-306 were indeed commented out. And I'm using a direct clone of the repo, which tracks develop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue describes a potential bug in ml-agents.
Projects
None yet
Development

No branches or pull requests

3 participants