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

great work, having troubles running with minivilles #9

Open
tal-tepper opened this issue Jan 14, 2025 · 1 comment
Open

great work, having troubles running with minivilles #9

tal-tepper opened this issue Jan 14, 2025 · 1 comment

Comments

@tal-tepper
Copy link

Hi,

thanks for this repo, it looks amazing.
I tried to play/train minivilles and it crushes during MCTS.
it looks numba related, I tried to add NUMBA_DISABLE_JIT=1 in pit for playing and it didn't help(probably did it wrong).
part of the error:
File "/home/user/repos/alpha-zero-general/MCTS.py", line 164, in search
a, next_s, next_player = get_next_best_action_and_canonical_state(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/repos/alpha-zero-general/alpha_env/lib/python3.11/site-packages/numba/core/dispatcher.py", line 423, in _compile_for_args
error_rewrite(e, 'typing')
File "/home/user/repos/alpha-zero-general/alpha_env/lib/python3.11/site-packages/numba/core/dispatcher.py", line 364, in error_rewrite
raise e.with_traceback(None)
numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)

  • Resolution failure for literal arguments:
    Failed in nopython mode pipeline (step: nopython frontend)
  • Resolution failure for literal arguments:
    Failed in nopython mode pipeline (step: nopython frontend)
  • Resolution failure for literal arguments:
    Failed in nopython mode pipeline (step: nopython frontend)
    No implementation of function Function(<function clip at 0x75d085a94220>) found for signature:

clip(int64, Literalint, Literalint)

thank you in advance
if you don't have time and just throw me a lead it will also be great

@cestpasphoto
Copy link
Owner

Hi @tal-tepper ,

No issue without Numba:
NUMBA_DISABLE_JIT=1 python3 ./pit.py minivilles minivilles/pretrained_2players.pt minivilles/pretrained_2players.pt -n 1 --display

but Numba seems not to support np.clip properly as you highlighted. So I just rewrote it and it seems to work, please check main branch with latest commit. Note that I didn't expected anyone to use this game except me so there's many things written in French on the console during play ...

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

2 participants