ray/doc/source/ray-overview/doc_test/ray_rllib.py
Max Pumperla d6bff736f3
[docs] test ray.io snippets (#22822)
Tests all snippets we have on ray.io. There were some minor issues, which I'll fix upstream.

Signed-off-by: Max Pumperla <max.pumperla@googlemail.com>
2022-03-08 15:50:57 +00:00

8 lines
207 B
Python

from ray import tune
from ray.rllib.agents.ppo import PPOTrainer
tune.run(
PPOTrainer,
stop={"episode_len_mean": 20},
config={"env": "CartPole-v0", "framework": "torch", "log_level": "INFO"},
)