2019-12-30 15:27:32 -05:00
|
|
|
from ray.rllib.utils.annotations import override, PublicAPI, DeveloperAPI
|
|
|
|
from ray.rllib.utils.framework import try_import_tf, try_import_tfp, \
|
|
|
|
try_import_torch
|
|
|
|
from ray.rllib.utils.deprecation import deprecation_warning, renamed_agent, \
|
|
|
|
renamed_class, renamed_function
|
2017-12-30 00:24:54 -08:00
|
|
|
from ray.rllib.utils.filter_manager import FilterManager
|
2018-07-01 00:05:08 -07:00
|
|
|
from ray.rllib.utils.filter import Filter
|
2019-12-30 15:27:32 -05:00
|
|
|
from ray.rllib.utils.numpy import sigmoid, softmax, relu, one_hot, fc, lstm, \
|
|
|
|
SMALL_NUMBER, LARGE_INTEGER
|
2018-07-01 00:05:08 -07:00
|
|
|
from ray.rllib.utils.policy_client import PolicyClient
|
|
|
|
from ray.rllib.utils.policy_server import PolicyServer
|
2019-12-30 15:27:32 -05:00
|
|
|
from ray.rllib.utils.test_utils import check
|
2020-01-06 21:11:03 -05:00
|
|
|
from ray.tune.utils import merge_dicts, deep_update
|
2017-12-30 00:24:54 -08:00
|
|
|
|
2019-05-20 16:46:05 -07:00
|
|
|
|
2019-06-07 16:45:36 -07:00
|
|
|
def add_mixins(base, mixins):
|
|
|
|
"""Returns a new class with mixins applied in priority order."""
|
|
|
|
|
|
|
|
mixins = list(mixins or [])
|
|
|
|
|
|
|
|
while mixins:
|
|
|
|
|
|
|
|
class new_base(mixins.pop(), base):
|
|
|
|
pass
|
|
|
|
|
|
|
|
base = new_base
|
|
|
|
|
|
|
|
return base
|
|
|
|
|
|
|
|
|
2018-12-26 03:07:11 -08:00
|
|
|
__all__ = [
|
2019-12-30 15:27:32 -05:00
|
|
|
"add_mixins",
|
|
|
|
"check",
|
|
|
|
"deprecation_warning",
|
|
|
|
"fc",
|
|
|
|
"lstm",
|
|
|
|
"one_hot",
|
|
|
|
"relu",
|
|
|
|
"sigmoid",
|
|
|
|
"softmax",
|
|
|
|
"deep_update",
|
|
|
|
"merge_dicts",
|
|
|
|
"override",
|
|
|
|
"renamed_function",
|
|
|
|
"renamed_agent",
|
|
|
|
"renamed_class",
|
|
|
|
"try_import_tf",
|
|
|
|
"try_import_tfp",
|
|
|
|
"try_import_torch",
|
|
|
|
"DeveloperAPI",
|
2019-04-07 00:36:18 -07:00
|
|
|
"Filter",
|
|
|
|
"FilterManager",
|
2019-12-30 15:27:32 -05:00
|
|
|
"LARGE_INTEGER",
|
2019-04-07 00:36:18 -07:00
|
|
|
"PolicyClient",
|
|
|
|
"PolicyServer",
|
2019-12-30 15:27:32 -05:00
|
|
|
"PublicAPI",
|
|
|
|
"SMALL_NUMBER",
|
2018-12-26 03:07:11 -08:00
|
|
|
]
|