mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05:00

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
11 lines
270 B
Python
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()
|