maxpumperla / betago

BetaGo: AlphaGo for the masses, live on GitHub.
http://maxpumperla.github.io/betago
MIT License
680 stars 162 forks source link

Total number of games used: 0 #33

Closed dhungle closed 7 years ago

dhungle commented 7 years ago

Hi, I tried to fetch some game data, using the given code.


from betago.processor import SevenPlaneProcessor
processor = SevenPlaneProcessor()
input_channels = processor.num_planes

X, y = processor.load_go_data(num_samples=1000)

However, the program returned "total number of games used: 0", and then raised this error:

Traceback (most recent call last):
  File "/home/hung/Desktop/test.py", line 6, in <module>
    X, y = processor.load_go_data(num_samples=1000)
  File "/home/hung/tensorflow/local/lib/python2.7/site-packages/betago/dataloader/base_processor.py", line 123, in load_go_data
    sampler = Sampler(data_dir=self.data_dir)
  File "/home/hung/tensorflow/local/lib/python2.7/site-packages/betago/dataloader/sampling.py", line 24, in __init__
    self.compute_test_samples()
  File "/home/hung/tensorflow/local/lib/python2.7/site-packages/betago/dataloader/sampling.py", line 74, in compute_test_samples
    test_games = self.draw_samples(self.num_test_games)
  File "/home/hung/tensorflow/local/lib/python2.7/site-packages/betago/dataloader/sampling.py", line 45, in draw_samples
    sample = random.choice(available_games)
  File "/usr/lib/python2.7/random.py", line 275, in choice
    return seq[int(self.random() * len(seq))]  # raises IndexError if seq is empty
IndexError: list index out of range

Please help!

likw99 commented 6 years ago

I met the same issue. How to solve it?

likw99 commented 6 years ago

@DuyHung-Le

maxpumperla commented 6 years ago

@likw99 I've never seen this before. Maybe remove your data folder and your kgs index html and run again. maybe the download was corrupted.

likw99 commented 6 years ago

This should be html parser issue (Download files moved to https:// ) Fixed.