当前位置:网站首页>【已解决】“The Unity environment took too long to respond. Make sure that :\n“
【已解决】“The Unity environment took too long to respond. Make sure that :\n“
2022-06-23 04:43:00 【Bungehurst】
运行环境
- Anaconda 4.12.0
- Python 3.6.13
- Pytorch 1.10.2
- Ray 1.10.0
- mlagents 0.28.0
- mpi4py 3.0.3
问题描述
在运行多进程并行训练时,Unity会有如下报错,此时程序卡死
"The Unity environment took too long to respond. Make sure that :\n"
mlagents_envs.exception.UnityTimeOutException: The Unity environment took too long to respond. Make sure that :
The environment does not need user interaction to launch
The Agents' Behavior Parameters > Behavior Type is set to "Default" The environment and the Python interface have compatible versions. If you're running on a headless server without graphics support, turn off display by either passing --no-graphics option or build your Unity executable as server build.
怀疑有可能是没有关闭图形造成的.
解决方案
修改unity3d_env.py文件,目录在:anaconda3/envs/<env_name>/lib/python3.6/site-packages/ray/rllib/env/wrappers/unity3d_env.py.
def __init__(self,
file_name: str = None,
port: Optional[int] = None,
seed: int = 0,
no_graphics: bool = True,
timeout_wait: int = 500,
episode_horizon: int = 1000):
- 修改
no_graphics为no_graphics: bool = True,关闭图形输出 - 修改
timeout_wait,适当增加超时等待时间
边栏推荐
- Add and multiply two polynomials using linked list
- Leetcode topic resolution remove nth node from end of list
- jvm-03. JVM memory model
- Infotnews | which Postcard will you receive from the universe?
- 论文笔记: 多标签学习 LSML
- Machine learning 3-ridge regression, Lasso, variable selection technique
- [cocos2d-x] custom ring menu
- 11、 Realization of textile fabric off shelf function
- Kotlin collaboration +retro most elegant network request use
- Vite learning (I) - Introduction
猜你喜欢
随机推荐
Jour 04 projet de santé mentale - gestion des rendez - vous - gestion des forfaits
How to specify the output path of pig register Project Log
Pyinstaller 打包pyttsx3 出错
基于T5L1的小型PLC设计方案
100-300 cases of single chip microcomputer program (detailed explanation of notes)
微软面试题:打印折纸的折痕
求二叉树最宽的层有多少个节点
Detailed explanation of redis persistence, master-slave and sentry architecture
Visual Studio调试技巧
Summary of ant usage (I): using ant to automatically package apk
论文笔记: 多标签学习 LSML
In the half year summary, it people just want to lie flat
Layer 2技术方案进展情况
WordPress contact form entries cross cross site scripting attack
C语言 获取秒、毫秒、微妙、纳秒时间戳
mongodb项目中可能出现的坑
Leetcode topic resolution single number
Ansible uses ordinary users to manage the controlled end
Difference between MySQL read committed and repeatability
Day_07 传智健康项目-Freemarker








