Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

程序正常运行但是无法产生ai提示 #59

Open
l68728 opened this issue Sep 4, 2024 · 3 comments
Open

程序正常运行但是无法产生ai提示 #59

l68728 opened this issue Sep 4, 2024 · 3 comments

Comments

@l68728
Copy link

l68728 commented Sep 4, 2024

main.py程序能跑通 使用了本地模型local mortal.pth,进入对局后无法显示ai提示。
系统macOS14.6.1
代码如下

2024-09-05 00:06:07,202 ERROR [BotThread]game_state.py:610 | Bot react error: failed to get reaction

Caused by:
    0: failed to execute `react_batch` on Python engine
    1: RuntimeError: Could not infer dtype of numpy.float32
Traceback (most recent call last):
  File "/Users/s/Downloads/aa/game/game_state.py", line 608, in _react_all
    output_reaction = self.mjai_bot.react_batch(self.mjai_pending_input_msgs)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/s/Downloads/aa/bot/bot.py", line 74, in react_batch
    last_reaction = self.react(input_list[-1])
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/s/Downloads/aa/bot/bot.py", line 125, in react
    react_str = self.mjai_bot.react(str_input)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: failed to get reaction

Caused by:
    0: failed to execute `react_batch` on Python engine
    1: RuntimeError: Could not infer dtype of numpy.float32

或者是否能打包一个mac版本的客户端?

@anonymized123
Copy link

This issue may be caused by the torch version is incompatible with the numpy version. Please use the pip or other tools to downgrade numpy to a version below 2.0

@Mr-EEEeee
Copy link

我将numpy降级至1.26.4已解决,如[anonymized123]所说降级至2.0版本以下应该皆可。

@xushaowu
Copy link

我将numpy降级至1.26.4已解决,如[anonymized123]所说降级至2.0版本以下应该皆可。

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants