Equim-chan / Mortal

🚀🀄️ A fast and strong AI for riichi mahjong, powered by Rust and deep reinforcement learning.
https://mortal.ekyu.moe
GNU Affero General Public License v3.0
929 stars 118 forks source link

compile数据干扰 #58

Closed hyskylord closed 9 months ago

hyskylord commented 9 months ago

在V4的训练过程中遇到了一个现象,运行了testplay之后学习速度会降低大概15%,如图所示。经过研究推测test时的优化干扰了性能。目前临时的解决办法是torch._dynamo.reset(),副作用则是每次testplay之后都要重新compile一遍model。不知道有没有更好的解决办法。

image

Koyonomi commented 9 months ago

我的设置是 正在训练的model启用了torch.compile,baseline model未启用torch.compile。 没有出现该问题。

hyskylord commented 9 months ago

似乎与torch版本有关,已解决。