ray/doc/source/ray-overview/doc_test/ray_rllib.py
Kai Fricke 8fe439998e
[air/tuner/docs] Update docs for Tuner() API 1: RSTs, docs, move reuse_actors (#26930)
Signed-off-by: Kai Fricke coding@kaifricke.com

Why are these changes needed?
Splitting up #26884: This PR includes changes to use Tuner() instead of tune.run() for most docs files (rst and py), and a change to move reuse_actors to the TuneConfig
2022-07-24 07:45:24 -07:00

11 lines
270 B
Python

from ray import air, tune
from ray.rllib.algorithms.ppo import PPO
tuner = tune.Tuner(
PPO,
run_config=air.RunConfig(
stop={"episode_len_mean": 20},
),
param_space={"env": "CartPole-v0", "framework": "torch", "log_level": "INFO"},
)
tuner.fit()