mirror of
https://github.com/wassname/ray.git
synced 2026-09-09 11:32:43 +08:00
'Policy' argument doesn't exist (#11276)
policy argument doesn't exist anymore and has been renamed to policy_class
This commit is contained in:
@@ -564,7 +564,7 @@ Here is an example of creating a set of rollout workers and using them gather ex
|
||||
env = gym.make("CartPole-v0")
|
||||
policy = CustomPolicy(env.observation_space, env.action_space, {})
|
||||
workers = WorkerSet(
|
||||
policy=CustomPolicy,
|
||||
policy_class=CustomPolicy,
|
||||
env_creator=lambda c: gym.make("CartPole-v0"),
|
||||
num_workers=10)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user