0

I am trying follow this tutorial 1: https://github.com/anyscale/academy/blob/main/ray-rllib/02-Introduction-to-RLlib.ipynb. But when I am implementing it on Google colab, I am not getting any results. It is only showing that the trial pending and memory is allocated

from ray import tune
from ray.rllib.agents.ppo import PPOTrainer, DEFAULT_CONFIG

import ray
info = ray.init(ignore_reinit_error=True)
tune.run(PPOTrainer, 
        config={"env": "CartPole-v1"},
        stop={"training_iteration": 20},
        local_dir = "/content/ppo",
        checkpoint_at_end=True,
        verbose=2            # 2 for INFO; change to 1 or 0 to reduce the output.
        )

After running this instance, I am getting

enter image description here

Am I getting anything wrong here? Why is it not running even if ray is initialised

A_the_kunal
  • 59
  • 2
  • 8

1 Answers1

0

For me, adding the argument num_cpus=12 in ray.init() solved the issue.

Kai
  • 1