You’ll likely need to reinstall torch module, you can verify the python installation or update it. That may work, if not you will forcely need to reinstall torch which is not hard, just google it
guys my python in unreal is using the cpu versoin of torch , and i am not able to bring the python version where i have cuda version enabled to unreal .
do anyone knows how to tackle it
Thank you for the reply . yes , It was due to the installation of cuda version of torch different from Unreal python editor,
i was installing it on my default python editor.
Hello @Deathcalibur ,
Thank you for this Plug In and Tutorial.
I plan to edit the C++ classes such as LearningAgentsPPOTrainer to add more information sent to the python code for instance. I created a subclass MyLearningAgentsPPOTrainer to change it in MakePPOTrainer, but most of your functions in LearningAgentsPPOTrainer are not virtual and attributes are private without getters.
What would you recommend me to work on top of your plugin ?
We don’t suggest you subclass the PPO class and instead just make a new class that inherits directly from ULearningAgentsManagerListener. You can copy the existing code as a starting place.
Wow I just found a pernicious bug which was keeping Sockets from working reliably on Mac and Linux. I made a mistake on LearningSocketTraining.cpp line 49 - FTimespan are measured in 0.1 microseconds and I thought 1.0… basically we were waiting 10x shorter than we should have been.
Can confirm that Learning Agents is working much better on Linux now!
I am following the “Learning to Drive” 5.5 tutorial, but I am not sure what I did wrong here:
In this section, it says to set the PPO Class to “BP_SportsCarTrainingEnv”, that is a child of the class “LearningAgentsTrainingEnvironment”, which is not compatible with the class “Learning agents PPO Trainer” requested in the variable.
@Deathcalibur having the same issue that others have had above. Running Windows and UE 5.5. I have tried both solutions posted earlier, that is to say 1) Closing UE and deleting the PipInstall folder and having UE auto-install assets upon boot (tried this twice), and 2) Uninstalling and re-installing torch via cmd with my project open.
Neither have worked. Not willing to download a random dll to sys32 either (no shade, to each their own).
When should I start burning incense and praying to the project’s machine spirit? Or do you think there may be another way? Was excited to get this running.
Logfile for reference:
LogLearning: Display: Subprocess: File “C:\Program Files\Epic Games\UE_5.5\Engine\Plugins\Experimental\LearningAgents\Content\Python\train_ppo.py”, line 9, in
LogLearning: Display: Subprocess: import torch
LogLearning: Display: Subprocess: File “C:\Users[username]\OneDrive\Documents\Unreal Projects\LearningAgentsDriveB\Intermediate\PipInstall\Lib\site-packages\torch_init_.py”, line 148, in
LogLearning: Display: Subprocess: raise err
LogLearning: Display: Subprocess: OSError: [WinError 126] The specified module could not be found. Error loading “C:\Users[username]\OneDrive\Documents\Unreal Projects\LearningAgentsDriveB\Intermediate\PipInstall\Lib\site-packages\torch\lib\fbgemm.dll” or one of its dependencies.
LogLearning: Error: PPOTrainer_0: Error sending policy to trainer: Unexpected communication received. Check log for additional errors.
LogLearning: Error: PPOTrainer_0: Training has failed. Check log for errors.
I hope this message finds you well. I’m writing to inquire about the possibility of introducing custom configuration options for neural networks in the Learning Agents plugin.
Currently, we’re able to set the number of hidden layers, the number of neurons, and the activation function during initialization. However, I often feel that these predefined options don’t fully meet my needs.
What I’m envisioning is the ability to use different activation functions within the same hidden layer.
For example:
In the first hidden layer, I’d like to have 5 linear neurons (which, by the way, aren’t currently available as an activation function) and 10 ReLU neurons.
In the second layer, I’d like 10 Tanh neurons, and so on.
In other words, I’d like the user to be able to design the neural network architecture more flexibly, tailoring it to their specific requirements.
I’m not sure if this is feasible, as my knowledge of C++ is limited, but I imagine this could be implemented as nodes in Blueprint. Users could connect these nodes sequentially, specifying parameters like:
Hidden layer
Number of neurons
Type of neurons (activation function)
Additionally, there would need to be input and output parameters for the current neural network, allowing users to add nodes to an existing structure.
I believe this would greatly enhance the plugin’s flexibility and open up new possibilities for experimentation. I’d be extremely grateful if such a feature could be considered for future updates.
Thank you for your time, and I look forward to hearing your thoughts!
Sorry, we don’t support this level of customization yet in the policy backbone network. We haven’t found these sort of tweaks to be that impactful compared to spending more time considered the observations an agent needs.
We’ll consider getting to this when we can, but it’s pretty low on the priority list compared to some of the other more impactful features we have in flight.
I appreciate the follow-through. Attempted the specified fix and I’m still getting the same error. Assuming other pytorch dependencies. Looking forward to testing out 5.6!
Hello!
I am having some issues with tensorboard, after following the tutorial on the tensorboard page I get the “No dashboards are active for the current data set.” page.
Additionally I have this in the Unreal engine log: Subprocess: Warning: Failed to Load TensorBoard: No module named ‘tensorboard’. Please add manually to site-packages.