Skip to content

Cartpole example is not working in colab. #212

Description

@bwarre471

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions