PG unify/cleanup tf vs torch and PG functionality test cases (tf + torch). (#6650)

* 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.
This commit is contained in:
Sven
2020-01-02 19:08:03 -05:00
committed by Eric Liang
parent d206445caf
commit f1b56fa5ee
21 changed files with 215 additions and 102 deletions
+6 -1
View File
@@ -124,8 +124,13 @@ class Trainable(object):
@classmethod
def resource_help(cls, config):
"""Returns a help string for configuring this trainable's resources."""
"""
Args:
config (dict): The Trainer's config dict.
Returns:
str: A help string for configuring this trainable's resources.
"""
return ""
def current_ip(self):