Commit db30c255 authored by Yuxin Wu's avatar Yuxin Wu

add back-compat for triggerable

parent 0fda5f71
...@@ -7,7 +7,7 @@ from abc import ABCMeta ...@@ -7,7 +7,7 @@ from abc import ABCMeta
import six import six
from ..tfutils.common import get_op_or_tensor_by_name from ..tfutils.common import get_op_or_tensor_by_name
__all__ = ['Callback', 'ProxyCallback', 'CallbackFactory'] __all__ = ['Callback', 'ProxyCallback', 'CallbackFactory', 'Triggerable']
@six.add_metaclass(ABCMeta) @six.add_metaclass(ABCMeta)
...@@ -161,6 +161,10 @@ class Callback(object): ...@@ -161,6 +161,10 @@ class Callback(object):
return type(self).__name__ return type(self).__name__
# back-compat. in case someone write something in triggerable
Triggerable = Callback
class ProxyCallback(Callback): class ProxyCallback(Callback):
""" A callback which proxy all methods to another callback. """ A callback which proxy all methods to another callback.
It's useful as a base class of callbacks which decorate other callbacks. It's useful as a base class of callbacks which decorate other callbacks.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment