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 load the agent and get baseline result in the rainbow paper #123

Closed
zhuyifengzju opened this issue Dec 16, 2019 · 11 comments
Closed

Comments

@zhuyifengzju
Copy link

Hi, I was trying to load a rainbow agent form the checkpoint of breakout and want to see the results from the paper, but I was not able to make it work. It seems that the checkpoint prefix does not match the agent codebase. I am not sure if I am wrong about this. Any help would be appreciated. Thanks!

@psc-g
Copy link
Collaborator

psc-g commented Dec 16, 2019 via email

@zhuyifengzju
Copy link
Author

Thanks for your reply! However, my agent is still freezing when I use the visualization. Here is what I did:

`from dopamine.utils import example_viz_lib
num_steps = 1000
example_viz_lib.run(agent='rainbow', game='Seaquest', num_steps=num_steps,
root_dir='./viz', restore_ckpt='./Seaquest_checkpoint/checkpoints/tf_ckpt-199')

`

And I added the legacy checkpoint load in the command line using gin-binding argument. The agent in seaquest does not move. The same thing happens to the breakout agent. If you have any thought why this is happening, please let me know. Thanks!

@psc-g
Copy link
Collaborator

psc-g commented Dec 16, 2019 via email

@zhuyifengzju
Copy link
Author

Yes, that is what happened

@psc-g
Copy link
Collaborator

psc-g commented Dec 17, 2019 via email

@zhuyifengzju
Copy link
Author

Hi, I am checking the example_viz_lib.py file, and I found that the variables_to_restore in the reload_checkpoint function (In the MyRainbowAgent class) does not have all the variables from include_vars. I only got beta1_power:0 and beta2_power:0 variables. I feel like there is something wrong with slim.get_variables_to_restore. Could you help check if everything goes correctly on your side? Thanks!

@psc-g
Copy link
Collaborator

psc-g commented Dec 18, 2019

ah, i think i know what the issue is. could you replace the line

variables_to_restore = contrib_slim...

with the following line:

variables_to_restore = atari_lib.maybe_transform_variable_names(tf.all_variables(), legacy_checkpoint_load=True)

i think that should resolve your issue, but let me know if it doesn't. i will be pushing a fix to this in the next couple of days.

thanks for pointing this out!

@zhuyifengzju
Copy link
Author

Thanks for the reply! Actually I removed ":0" and mapped new names to old names (Changing kernel to weights and bias to biases) and it worked. It seemed that ":0" is also making things failed.

@psc-g
Copy link
Collaborator

psc-g commented Dec 18, 2019 via email

@zhuyifengzju
Copy link
Author

Sure, thanks for answering my issue!

@psc-g
Copy link
Collaborator

psc-g commented Dec 19, 2019

i just pushed out a fix for this. let me know if you still run into problems by reopening this issue or raising another one.

@psc-g psc-g closed this as completed Dec 19, 2019
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