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

Reusing replay_buffer with new model give KeyErrors on self.buffer[game_id] #115

Closed
schwab opened this issue Jan 14, 2021 · 1 comment
Closed

Comments

@schwab
Copy link

schwab commented Jan 14, 2021

Scenario

I'd like to reuse the replay_buffer from an earlier run, but on a slightly different model. Is there anyway to do this correctly? I've tried copying just the replay_buffer.pkl file to its own folder ./replays and just loading that folder with the new model, but this results in errors like ....

 (pid=547088, ip=192.168.1.175)
  File "python/ray/_raylet.pyx", line 463, in ray._raylet.execute_task
  File "python/ray/_raylet.pyx", line 415, in ray._raylet.execute_task.function_executor
  File "/home/mcstar_dev/project/muzero-general/replay_buffer.py", line 313, in reanalyse
    game_id, game_history, _ = ray.get(
ray.exceptions.RayTaskError(KeyError): ray::ReplayBuffer.sample_game() (pid=547087, ip=192.168.1.175)
  File "python/ray/_raylet.pyx", line 463, in ray._raylet.execute_task
  File "python/ray/_raylet.pyx", line 415, in ray._raylet.execute_task.function_executor
  File "/home/mcstar_dev/project/muzero-general/replay_buffer.py", line 155, in sample_game
    return game_id, self.buffer[game_id], game_prob
KeyError: -2

What's the correct way to accomplish re-using the old replay data for new runs or is this not supported? Is there anyway to force reanalyse to use only valid game_ids?

@ahainaut ahainaut closed this as completed Feb 8, 2021
@ahainaut
Copy link
Collaborator

ahainaut commented Feb 8, 2021

Closed this, since it's the same issue as #114

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