mirror of
https://github.com/vale981/ray
synced 2025-03-08 11:31:40 -05:00

* Unifying the code for PGTrainer/Policy wrt tf vs torch. Adding loss function test cases for the PGAgent (confirm equivalence of tf and torch). * Fix LINT line-len errors. * Fix LINT errors. * Fix `tf_pg_policy` imports (formerly: `pg_policy`). * Rename tf_pg_... into pg_tf_... following <alg>_<framework>_... convention, where ...=policy/loss/agent/trainer. Retire `PGAgent` class (use PGTrainer instead). * - Move PG test into agents/pg/tests directory. - All test cases will be located near the classes that are tested and then built into the Bazel/Travis test suite. * Moved post_process_advantages into pg.py (from pg_tf_policy.py), b/c the function is not a tf-specific one. * Fix remaining import errors for agents/pg/... * Fix circular dependency in pg imports. * Add pg tests to Jenkins test suite.
7 lines
322 B
Python
7 lines
322 B
Python
from ray.rllib.agents.pg.pg import PGTrainer, DEFAULT_CONFIG
|
|
from ray.rllib.agents.pg.pg_tf_policy import pg_tf_loss, \
|
|
post_process_advantages
|
|
from ray.rllib.agents.pg.pg_torch_policy import pg_torch_loss
|
|
|
|
__all__ = ["PGTrainer", "pg_tf_loss", "pg_torch_loss",
|
|
"post_process_advantages", "DEFAULT_CONFIG"]
|