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
View File
@@ -7,6 +7,12 @@ class RayNotDictionarySerializable(Exception):
pass
# This exception is used to represent situations where cloudpickle fails to
# pickle an object (cloudpickle can fail in many different ways).
class CloudPickleError(Exception):
pass
def check_serializable(cls):
"""Throws an exception if Ray cannot serialize this class efficiently.