huawei-noah / xingtian

xingtian is a componentized library for the development and verification of reinforcement learning algorithms
MIT License
301 stars 89 forks source link

Update simulate_environment.py #12

Closed ZhuYQi closed 3 years ago

ZhuYQi commented 3 years ago

由于写入硬盘时间不稳定(写入时间大于0.1秒时会报错),可能出现 交互文件写入完毕的时间 略大于算法执行实时时间 的情况,算法提前终止。

2021-05-24 09:38:22,739 [simulate_environment.py | 237] ERROR: output.json is not the newest

两种解决方案: 1.写入文件过程加锁 2.添加一点写入延迟时间

CLAassistant commented 3 years ago

CLA assistant check
All committers have signed the CLA.

hustqj commented 3 years ago

目前模拟器与算法之间的交互延时已经很高,不适宜再增加单轮延时