Allow remote functions to specify max executions and kill worker once limit is reached. (#660)

* implement restarting workers after certain number of task executions

* Clean up python code.

* Don't start new worker when an actor disconnects.

* Move wait_for_pid_to_exit to test_utils.py.

* Add test.

* Fix linting errors.

* Fix linting.

* Fix typo.
This commit is contained in:
Philipp Moritz
2017-06-13 07:34:58 +00:00
committed by Robert Nishihara
parent 4374ad1453
commit 54925996ca
9 changed files with 214 additions and 116 deletions
+9
View File
@@ -3,6 +3,7 @@ from __future__ import division
from __future__ import print_function
import binascii
import collections
import numpy as np
import sys
@@ -55,3 +56,11 @@ def binary_to_hex(identifier):
def hex_to_binary(hex_identifier):
return binascii.unhexlify(hex_identifier)
FunctionProperties = collections.namedtuple("FunctionProperties",
["num_return_vals",
"num_cpus",
"num_gpus",
"max_calls"])
"""FunctionProperties: A named tuple storing remote functions information."""