Serialize lambdas, sets, and types with pickle by default. (#511)

* Serialize lambdas with pickle by default.

* Serialize sets with pickle by default.

* Serialize types with pickle by default.

* Small update to documentation.

* Update tests.
This commit is contained in:
Robert Nishihara
2017-05-04 00:16:35 -07:00
committed by Philipp Moritz
parent 7deff73e55
commit 8532ba4272
3 changed files with 47 additions and 6 deletions
+6
View File
@@ -805,6 +805,12 @@ def initialize_numbuf(worker=global_worker):
register_class(RayTaskError)
register_class(RayGetError)
register_class(RayGetArgumentError)
# Tell Ray to serialize lambdas with pickle.
register_class(type(lambda: 0), pickle=True)
# Tell Ray to serialize sets with pickle.
register_class(type(set()), pickle=True)
# Tell Ray to serialize types with pickle.
register_class(type(int), pickle=True)
def get_address_info_from_redis_helper(redis_address, node_ip_address):