Expose custom serializers through the API. (#1147)

* Expose custom serializers through the API.

* minor renaming

* Add test.

* Remove comment.

* Clean up assertions.
This commit is contained in:
Robert Nishihara
2017-10-29 00:08:55 -07:00
committed by Philipp Moritz
parent 3b157ab933
commit 6852e8839e
4 changed files with 171 additions and 37 deletions
+6 -5
View File
@@ -40,9 +40,10 @@ except ImportError as e:
e.args += (helpful_message,)
raise
from ray.worker import (register_class, error_info, init, connect, disconnect,
from ray.worker import (error_info, init, connect, disconnect,
get, put, wait, remote, log_event, log_span,
flush_log, get_gpu_ids, get_webui_url) # noqa: E402
flush_log, get_gpu_ids, get_webui_url,
register_custom_serializer) # noqa: E402
from ray.worker import (SCRIPT_MODE, WORKER_MODE, PYTHON_MODE,
SILENT_MODE) # noqa: E402
from ray.worker import global_state # noqa: E402
@@ -54,9 +55,9 @@ import ray.actor # noqa: F401
# Fix this.
__version__ = "0.2.1"
__all__ = ["register_class", "error_info", "init", "connect", "disconnect",
"get", "put", "wait", "remote", "log_event", "log_span",
"flush_log", "actor", "get_gpu_ids", "get_webui_url",
__all__ = ["error_info", "init", "connect", "disconnect", "get", "put", "wait",
"remote", "log_event", "log_span", "flush_log", "actor",
"get_gpu_ids", "get_webui_url", "register_custom_serializer",
"SCRIPT_MODE", "WORKER_MODE", "PYTHON_MODE", "SILENT_MODE",
"global_state", "__version__"]