Change ray.worker.cleanup -> ray.shutdown and improve API documentation. (#2374)

* Change ray.worker.cleanup -> ray.shutdown and improve API documentation.

* Deprecate ray.worker.cleanup() gracefully.

* Fix linting
This commit is contained in:
Robert Nishihara
2018-07-12 14:00:00 -05:00
committed by Philipp Moritz
parent b316afeb43
commit 515da7721a
30 changed files with 282 additions and 407 deletions
+2 -2
View File
@@ -125,8 +125,8 @@ class RemoteFunction(object):
resources = ray.utils.resources_from_resource_arguments(
self._num_cpus, self._num_gpus, self._resources, num_cpus,
num_gpus, resources)
if worker.mode == ray.worker.PYTHON_MODE:
# In PYTHON_MODE, remote calls simply execute the function.
if worker.mode == ray.worker.LOCAL_MODE:
# In LOCAL_MODE, remote calls simply execute the function.
# We copy the arguments to prevent the function call from
# mutating them and to match the usual behavior of
# immutable remote objects.