krumiaa / MindMaker

MindMaker UE4 Machine Learning Toolkit
257 stars 31 forks source link

Error when launching the example maps #16

Open Epilol opened 2 years ago

Epilol commented 2 years ago

Hello, I'm trying to test the plugin on the examples map but the training doesn't start. I'm using UE5

when I press the play button nothing happens. This is what I read in the output log:

LogBlueprintUserMessages: [cart_2] MindMaker Launched LogBlueprintUserMessages: [cart_2] Waiting for Connection from Learning Engine PIE: Server logged in PIE: Play in editor total start time 1.347 seconds. SocketIO: SocketIO Invalid appears to have lost connection, reconnecting attempt 0 with delay 5000 SocketIO: SocketIO Invalid appears to have lost connection, reconnecting attempt 1 with delay 7500 SocketIO: SocketIO Connected with session: 353587e91bee425d8acada58836da487 SocketIO: SocketIO 353587e91bee425d8acada58836da487 connected to namespace: / SocketIO: Warning: Attempted to connect to http://localhost:3000 when we're already connected. Request ignored. LogOutputDevice: Warning: Script Stack (3 frames): cart_BP_C.LaunchMindMaker cart_BP_C.ExecuteUbergraph_cart_BP cart_BP_C.BndEvtSocketIOClient_K2Node_ComponentBoundEvent_0_SIOCOpenEventSignatureDelegateSignature LogOutputDevice: Error: Ensure condition failed: Lhs.Array.Num() == Lhs.InitialNum [File:C:\Users\epilo\Documents\GitHub\MindMaker_UE5\Engine\Source\Runtime\Core\Public\Containers\SparseArray.h] [Line: 972] Container has changed during ranged-for iteration! LogStats: FDebug::EnsureFailed - 0.000 s LogSlate: Updating window title bar state: overlay mode, drag disabled, window buttons hidden, title bar hidden LogWorld: BeginTearingDown for /Game/MindMaker/Examples/Assets/Maps/UEDPIE_0_Cartpole LogWorld: UWorld::CleanupWorld for Cartpole, bSessionEnded=true, bCleanupResources=true SocketIO: SocketIO Disconnected 353587e91bee425d8acada58836da487 reason: CLOSE_REASON_NORMAL

Debugging the code it seems the function emit gets called but, after that I'm kind of lost.

if I look at netstat in cmd the process seems connected to localhost port 3000 correctly.

Maybe I'm missing something simple. Are the examples supposed to work out of the box or do I have to change any parameter?

Epilol commented 2 years ago

I fixed the warning about already connected by just removing the connect node in the blueprint (connect was being called twice). I'm still not sure what is causing the assert.

The issue seems what I'm noticing on the server cmd:

Exception in thread Thread-4: Traceback (most recent call last): File "threading.py", line 926, in _bootstrap_inner File "threading.py", line 870, in run File "site-packages\socketio\server.py", line 679, in _handle_event_internal File "site-packages\socketio\server.py", line 708, in _trigger_event File "mindmaker.py", line 340, in recieve KeyError: '_init_setup_model'

krumiaa commented 2 years ago

Aware of these compatibility issues with the latest Preview of UE5 – at least one person was able to make changes to the server.py and some of c++ files to get it working, I will be attempting to do the same shortly and push a new release.

Epilol commented 2 years ago

thanks a lot! I will give it a shot as well, where is the server.py file located by the way? I couldn't find it

krumiaa commented 2 years ago

Still working on this, was able to get a new plugin compiled for UE5 but stuck on the same error you were getting, seems to be an issue with some of the python source files, socketio\server.py etc. Will give an update once I have something working

jamesmr13 commented 1 year ago

Is there an update on this issue? Running into same problem on UE 5.0 while trying to run MatchToSample