ray/rllib/agents/ars/ars_torch_policy.py
Balaji Veeramani 7f1bacc7dc
[CI] Format Python code with Black (#21975)
See #21316 and #21311 for the motivation behind these changes.
2022-01-29 18:41:57 -08:00

20 lines
583 B
Python

# Code in this file is adapted from:
# https://github.com/openai/evolution-strategies-starter.
import ray
from ray.rllib.agents.es.es_torch_policy import (
after_init,
before_init,
make_model_and_action_dist,
)
from ray.rllib.policy.policy_template import build_policy_class
ARSTorchPolicy = build_policy_class(
name="ARSTorchPolicy",
framework="torch",
loss_fn=None,
get_default_config=lambda: ray.rllib.agents.ars.ars.DEFAULT_CONFIG,
before_init=before_init,
after_init=after_init,
make_model_and_action_dist=make_model_and_action_dist,
)