mirror of
https://github.com/wassname/ray.git
synced 2026-09-09 11:32:43 +08:00
[tune] using None as the parameter default value instead of mutable dict (#1501)
* do not use dict as default parameter * Update trial.py
This commit is contained in:
@@ -63,7 +63,7 @@ class Agent(Trainable):
|
||||
_allow_unknown_subkeys = []
|
||||
|
||||
def __init__(
|
||||
self, config={}, env=None, registry=get_registry(),
|
||||
self, config=None, env=None, registry=get_registry(),
|
||||
logger_creator=None):
|
||||
"""Initialize an RLLib agent.
|
||||
|
||||
@@ -77,6 +77,8 @@ class Agent(Trainable):
|
||||
object. If unspecified, a default logger is created.
|
||||
"""
|
||||
|
||||
config = config or {}
|
||||
|
||||
# Agents allow env ids to be passed directly to the constructor.
|
||||
self._env_id = env or config.get("env")
|
||||
Trainable.__init__(self, config, registry, logger_creator)
|
||||
|
||||
Reference in New Issue
Block a user