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

UE5: MindMaker (DL single node) gives (KeyError: '_init_setup_model') on play #20

Closed
OkMast opened this issue May 24, 2022 · 28 comments
Closed

Comments

@OkMast
Copy link

OkMast commented May 24, 2022

After clicking create project for UE5 (previously it would allow project creation for other versions, and the free plugin was also available for other versions, but now it shows support for only UE5 on the marketplace), it shows the following attached error.
TheErrorScreen

However, when I download and run the example project (cartpole), it runs as it should but on UE4.25, as Ai plugin is manually present in the plugins folder.
I have tried one too many things on different systems, but now I am more confused than ever if the error is environment on my system related, related to the changes in the 'supported versions' of the Mindmaker, or something else.

@krumiaa
Copy link
Owner

krumiaa commented May 25, 2022

This key error is caused by underscores in all the blueprint custom parameters for each DRL algorithm in the UE5 version of mindmaker. They must be removed and replaced with spaces in blueprints. For some reason the new release of the SocketIO json library for UE5 is not processing underscores. I believe I replaced all the underscores in the experimental UE5 release which can be downloaded along with the UE4 version here. https://unrealengine.com/marketplace/en-US/product/neurostudio-self-learning-ai/questions
Please let me know if this fixes the issue.

@OkMast
Copy link
Author

OkMast commented May 26, 2022

I downloaded the experimental UE5 release project you have linked above (epic games); that was the one I had used the last time around too. The issue is still the same, and I have attached a video for your reference so we are on the same page regarding the problem.

errorVideo.mp4

I am not sure exactly where I am supposed to fix the underscore problem in the blueprint custom parameters for each DRL algorithm. Maybe if you could go over it step by step in a video or something?

@krumiaa
Copy link
Owner

krumiaa commented May 27, 2022 via email

@OkMast
Copy link
Author

OkMast commented May 31, 2022

As of now, I am just trying to run the cartpole example, which uses PPO2 algorithm.
I have removed all underscores from all structures, and fair enough the error for "_init_setup_model" went away. However, it was replaced by the following error in the activation function parameter:
error_actfunc
Note that I have removed ALL the underscores in all the structures.

@krumiaa
Copy link
Owner

krumiaa commented May 31, 2022 via email

@krumiaa
Copy link
Owner

krumiaa commented Jun 1, 2022 via email

@An-nym-us
Copy link

Any fix yet, I'm still having the same problems, as the person above, removed all underscores, and followed all other directions listed.

@OkMast
Copy link
Author

OkMast commented Jun 3, 2022

Are any of the other algorithms working when you change it from PPO2 to something else? I have tried a few and they all seemed to work, maybe I zip and share the project files with you to make sure we are both using identical setup, though if you downloaded the UE marketplace version, that should already be the case. What release of UE5 are you using?

I have tried to run different algorithms, none of them worked. I am using 5.0.1 version of UE5. (Python 3.7.0 environment)

perhapse the mindmaker.exe in your content directory is still the older version

This is not possible since I have used another, completely new CPU and environment which had no prior installations of this project or even UE. I installed everything from scratch and then followed your directions exactly.
I also did everything else you have asked about in your second text above.
Maybe if you zip and share your project like you mentioned above on my email: shizaaman11@gmail.com, and I try and run it on my end

@krumiaa
Copy link
Owner

krumiaa commented Jun 3, 2022

will do, sending you a zip to your email. curious to get to the bottom of this

@krumiaa
Copy link
Owner

krumiaa commented Jun 8, 2022

UPDATE: Just released a version of this for UE 5.0.2 which can be downloaded from the marketplace. https://www.unrealengine.com/marketplace/en-US/product/neurostudio-self-learning-ai
make sure you are using the updated example files with DRL content, this has _ removed

I'm thinking this may have fixed this issue. Still wasn’t able to replicate but if it now works, please let me know by updating this issue.

@Malados
Copy link

Malados commented Jun 8, 2022

always the same error on my side

@oshirokn
Copy link

oshirokn commented Jun 9, 2022

Same for me too

@OkMast
Copy link
Author

OkMast commented Jun 13, 2022

error in the zip file you emailed:
6thJuneMindmakerError_ss2
The updated version on epic games gives the same error as the 'act_func' error above- that is, after I yet again personally removed all the underscores (that were again not removed for this new version) in all the structs. Tried all the other things you asked me to try too.

@krumiaa
Copy link
Owner

krumiaa commented Jun 13, 2022

Was finally able to replicate the issue and hopefully the fix is now up and working. Please try updating again from the marketplace. The issue seems to be that the project files on the marketplace included both the older UE 4.27 version of mindmaker and a version for UE 5, but when one created a new project from UE launcher rather than downloading the zipped project files with both folders, the launcher was defaulting to the UE 4.27 version of mindmaker, and running it inside UE 5. I thought it would automatically use the appropriate version but apparently not. Apologies for that, Im still getting to know the marketplace system and it seems things may have changed with the release of UE 5.

@krumiaa
Copy link
Owner

krumiaa commented Jun 22, 2022

circling back to make sure this issue was fixed by the latest update on the marketplace, can anyone comment?

@oshirokn
Copy link

Marketplace version works fine for me. Thanks for the update!

@krumiaa
Copy link
Owner

krumiaa commented Jun 22, 2022

Great, closing this for now in that case

@krumiaa krumiaa closed this as completed Jun 22, 2022
@Malados
Copy link

Malados commented Jun 22, 2022

Hey, i try to use your update but i have a new error. Maybe my fault, i'm not in my main pc. I thought it was python problem so i uninstall / install and try some tricks but not result. Any idea ?

error

@OkMast
Copy link
Author

OkMast commented Jun 23, 2022

Yes it works fine now, thank you Aaron! :)

Maybe my fault, i'm not in my main pc.

Yeah that happens with me too (the mindmaker.exe file closing immediately) on one of my computers, but it works fine on another. This is probably something related to our setup, or the installed dependencies. I've been trying to fix that issue for a while now with the previous functional version of mindmaker, even reinstalled my entire python and visual studio setup; tell me if you manage to fix it in the future. In the meantime, use another computer.

@An-nym-us
Copy link

An-nym-us commented Jun 23, 2022

I'm having the same error as Malados. What version of python are you using for those that got it to work. Im using python 3.9.

@krumiaa
Copy link
Owner

krumiaa commented Jun 24, 2022

This happened for me before and I think its related to Microsoft OpenMPI, since this is required for DDPG. Can download MPI here

https://www.microsoft.com/en-us/download/details.aspx?id=57467

and for python

conda install mpi4py

Please confirm if this is the fix, will publish an update

@EliasNacef
Copy link

EliasNacef commented Jun 24, 2022

Hey ! Just to let you know i had the same problem and installing mpi4py and MPI solved the mindmaker.exe crash

@An-nym-us
Copy link

thank, you, was able to find the link to the MPI. Was able to get mindmaker up and running. Some of the Reinfomrent learning algorithms still do not function while others do. I'm assuming this will get fixed in later updates.

@Malados
Copy link

Malados commented Jun 24, 2022

This happened for me before and I think its related to Microsoft OpenMPI, since this is required for DDPG. Can download MPI here

https://www.microsoft.com/en-us/download/details.aspx?id=57467

and for python

conda install mpi4py

Please confirm if this is the fix, will publish an update

works for me, thx you !

@Devanshu-singh-VR
Copy link

I am still have the problem, the mindmaker.exe is still crashing after installing all the stuff.
How "conda install mpi4py" is working? because UE5 uses its own python environment.

Here are the steps I did to run the UE5:

  1. I installed the mindmaker DLR plugin.
  2. I created a new project out of it.
  3. I downloaded the mindmaker learning engine.
    this one -> (MindMaker DRL Engine Single Node (Stable Baselines: A2C, DQN, PPO, ACER, TD3, SAC) - Win64)
  4. then I copy paste all the files to mindmaker folder as written in the mindmaker github.
  5. I installed the Microsoft OpenMPI.
  6. and mpi4py

if there anything still left to do? Kindly let me know

@krumiaa
Copy link
Owner

krumiaa commented Feb 20, 2023 via email

@Devanshu-singh-VR
Copy link

thanks @krumiaa, I tried the unreal engine 5.1 and its working fine.

The issue was coming in the unreal engine 5.0. But I think now I will use the UE5.1 rather than UE5.0.
Thanks once again.

@sadadsads
Copy link

thanks @krumiaa, I tried the unreal engine 5.1 and its working fine.

The issue was coming in the unreal engine 5.0. But I think now I will use the UE5.1 rather than UE5.0. Thanks once again.

can you share me with the mindmaker ai Plugin for ue 5.1 ,i can only find 5.0 ,5.2,5.3 online

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants