maxpumperla / deep_learning_and_the_game_of_go

Code and other material for the book "Deep Learning and the Game of Go"
https://www.manning.com/books/deep-learning-and-the-game-of-go
953 stars 387 forks source link

train_generator.py #32

Closed Tuxius closed 5 years ago

Tuxius commented 5 years ago

Dear all,

I am getting an error trying to run the example code from chapter 7 "train_generator.py". I downloaded the github repository and got the following error after running with python 2.7.12:

KGS-2003-19-7582-.tar.gz 7582 KGS-2002-19-3646-.tar.gz 3646 KGS-2001-19-2298-.tar.gz 2298 total num games: 179689 Drawn 100 samples: Traceback (most recent call last): File "train_generator.py", line 22, in <module> generator = processor.load_go_data('train', num_games, use_generator=True) # <3> File "/mnt/sambashare/deep_learning_and_the_game_of_go-master/code/dlgo/data/parallel_processor.py", line 46, in load_go_data self.map_to_workers(data_type, data) # <1> File "/mnt/sambashare/deep_learning_and_the_game_of_go-master/code/dlgo/data/parallel_processor.py", line 189, in map_to_workers _ = p.get() File "/usr/lib/python2.7/multiprocessing/pool.py", line 567, in get raise self._value TypeError: unbound method __new__() must be called with Sgf_game instance as first argument (got classobj instance instead) It seems that something with the parallel workers doesn't work, a topic not covered in the book. Any idea?

Best

Tuxius commented 5 years ago

Solution: Use Python 3.5.2