[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:
the-sea
2018-02-02 21:47:51 -08:00
committed by Eric Liang
parent 369773d3e8
commit a936468f99
3 changed files with 15 additions and 12 deletions
+2 -2
View File
@@ -48,7 +48,7 @@ class Trainable(object):
classes and objects by name.
"""
def __init__(self, config={}, registry=None, logger_creator=None):
def __init__(self, config=None, registry=None, logger_creator=None):
"""Initialize an Trainable.
Subclasses should prefer defining ``_setup()`` instead of overriding
@@ -68,7 +68,7 @@ class Trainable(object):
self._initialize_ok = False
self._experiment_id = uuid.uuid4().hex
self.config = config
self.config = config or {}
self.registry = registry
if logger_creator: