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

Not able to run main.py on m1 chipped machine #257

Open
alicezou opened this issue Nov 10, 2021 · 1 comment
Open

Not able to run main.py on m1 chipped machine #257

alicezou opened this issue Nov 10, 2021 · 1 comment

Comments

@alicezou
Copy link

alicezou commented Nov 10, 2021

Hi, I got assertion error on m1 chipped machine.
I git clone directly from the main branch.
I was able to run on my other computers or google coLab.

Attached is the log that I got:
2021-11-10 13:30:51 alicezous-Mac-mini.local main[11455] INFO Loading OthelloGame...
2021-11-10 13:30:51 alicezous-Mac-mini.local main[11455] INFO Loading NNetWrapper...
2021-11-10 13:30:51 alicezous-Mac-mini.local main[11455] WARNING Not loading a checkpoint!
2021-11-10 13:30:51 alicezous-Mac-mini.local main[11455] INFO Loading the Coach...
2021-11-10 13:30:51 alicezous-Mac-mini.local main[11455] INFO Starting the learning process 🎉
2021-11-10 13:30:51 alicezous-Mac-mini.local Coach[11455] INFO Starting Iter #1 ...
Self Play: 0%| | 0/100 [00:00<?, ?it/s]2021-11-10 13:30:51 alicezous-Mac-mini.local MCTS[11455] ERROR All valid moves were masked, doing a workaround.
Self Play: 0%| | 0/100 [00:00<?, ?it/s]
Traceback (most recent call last):
File "/Volumes/S/EECS592/alpha-zero-general/main.py", line 57, in
main()
File "/Volumes/S/EECS592/alpha-zero-general/main.py", line 53, in main
c.learn()
File "/Volumes/S/EECS592/alpha-zero-general/Coach.py", line 89, in learn
iterationTrainExamples += self.executeEpisode()
File "/Volumes/S/EECS592/alpha-zero-general/Coach.py", line 58, in executeEpisode
pi = self.mcts.getActionProb(canonicalBoard, temp=temp)
File "/Volumes/S/EECS592/alpha-zero-general/MCTS.py", line 38, in getActionProb
self.search(canonicalBoard)
File "/Volumes/S/EECS592/alpha-zero-general/MCTS.py", line 122, in search
next_s, next_player = self.game.getNextState(canonicalBoard, 1, a)
File "/Volumes/S/EECS592/alpha-zero-general/othello/OthelloGame.py", line 43, in getNextState
b.execute_move(move, player)
File "/Volumes/S/EECS592/alpha-zero-general/othello/OthelloLogic.py", line 111, in execute_move
assert len(list(flips))>0
AssertionError

@dweekly
Copy link

dweekly commented Sep 9, 2022

This may have been fixed; I'm able to run just fine on an M1 in the current build, though not with pytorch's new mps device support.

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