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

Muzero crashes when choosing spiel/backgammon #225

Open
1 task done
artshar opened this issue Aug 29, 2023 · 0 comments
Open
1 task done

Muzero crashes when choosing spiel/backgammon #225

artshar opened this issue Aug 29, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@artshar
Copy link

artshar commented Aug 29, 2023

Search before asking

  • I have searched the MuZero issues and found no similar bug report.

🐛 Describe the bug

Welcome to MuZero! Here's a list of games:
0. atari

  1. breakout
  2. cartpole
  3. connect4
  4. gomoku
  5. gridworld
  6. lunarlander
  7. simple_grid
  8. spiel
  9. tictactoe
  10. twentyone
    Enter a number to choose the game: 8
    2023-08-29 23:03:34,908 INFO worker.py:1621 -- Started a local Ray instance.
    Traceback (most recent call last):
    File "/home/server/muzero-general/muzero.py", line 650, in
    muzero = MuZero(game_name)
    ^^^^^^^^^^^^^^^^^
    File "/home/server/muzero-general/muzero.py", line 122, in init
    self.checkpoint["weights"], self.summary = copy.deepcopy(ray.get(cpu_weights))
    ^^^^^^^^^^^^^^^^^^^^
    File "/home/server/miniconda3/lib/python3.11/site-packages/ray/_private/auto_init_hook.py", line 24, in auto_init_wrapper
    return fn(*args, **kwargs)
    ^^^^^^^^^^^^^^^^^^^
    File "/home/server/miniconda3/lib/python3.11/site-packages/ray/_private/client_mode_hook.py", line 103, in wrapper
    return func(*args, **kwargs)
    ^^^^^^^^^^^^^^^^^^^^^
    File "/home/server/miniconda3/lib/python3.11/site-packages/ray/_private/worker.py", line 2524, in get
    raise value.as_instanceof_cause()
    ray.exceptions.RayTaskError(IndexError): ray::CPUActor.get_initial_weights() (pid=14044, ip=192.168.0.206, actor_id=cb6f54b46087791a64e1e24101000000, repr=<muzero.CPUActor object at 0x7fe752d29790>)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/server/muzero-general/muzero.py", line 489, in get_initial_weights
    model = models.MuZeroNetwork(config)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/server/muzero-general/models.py", line 23, in new
    return MuZeroResidualNetwork(
    ^^^^^^^^^^^^^^^^^^^^^^
    File "/home/server/muzero-general/models.py", line 463, in init
    else (reduced_channels_reward * observation_shape[1] * observation_shape[2])
    ~~~~~~~~~~~~~~~~~^^^
    IndexError: tuple index out of range

Add an example

image

Environment

Python 3.11.5(3.10.12)
Ubuntu 22.04
tourch 2.0.1+cu117

Minimal Reproducible Example

games/spiel.py line 23
game = pyspiel.load_game("backgammon")

python3.11 muzero.py
choose the game: 8

Additional

the error is reproduced on different hardware

@artshar artshar added the bug Something isn't working label Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant