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

Cartpole example is not working in colab. #212

Open
bwarre471 opened this issue Aug 14, 2023 · 0 comments
Open

Cartpole example is not working in colab. #212

bwarre471 opened this issue Aug 14, 2023 · 0 comments

Comments

@bwarre471
Copy link

bwarre471 commented Aug 14, 2023

Cartpole example

https://colab.research.google.com/github/google/dopamine/blob/master/dopamine/colab/cartpole.ipynb

Is pretty much out of date...

Using it's code on C51, it throws this error on my local machine:

~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
RuntimeError: in user code:

    File "/home/arre/Code/Syncd/exchange_downloader/snek/.venv/lib/python3.11/site-packages/dopamine/discrete_domains/gym_lib.py", line 297, in call  *
        q_values = tf.reduce_sum(self.support * probabilities, axis=2)

    RuntimeError: x: Attempting to capture an EagerTensor without building a function.

  In call to configurable 'DQNAgent' (<class 'dopamine.agents.dqn.dqn_agent.DQNAgent'>)
  In call to configurable 'RainbowAgent' (<class 'dopamine.agents.rainbow.rainbow_agent.RainbowAgent'>)
  In call to configurable 'create_agent' (<function create_agent at 0x7f9841d527a0>)
  In call to configurable 'Runner' (<class 'dopamine.discrete_domains.run_experiment.Runner'>)
  In call to configurable 'TrainRunner' (<class 'dopamine.discrete_domains.run_experiment.TrainRunner'>)
  In call to configurable 'create_runner' (<function create_runner at 0x7f9841d3df80>)

On colab, I can't even get there, because there's an PIP version installed, and that doesn't works. Only github version works with DQN example, but C51 example is non-functional.

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

1 participant