[rllib] Occasional Thread Error from RLlib (#1441)

* fix

* Revert "fix"

This reverts commit 808f7d7688a837e5ce4cc4209ca28390bc29f1d8.

* Driver's should ignore imports from other drivers.
This commit is contained in:
Eric Liang 2018-02-06 20:30:11 -08:00 committed by Robert Nishihara
parent 12095611c6
commit 4ec51a4660

View file

@ -1635,6 +1635,13 @@ def fetch_and_execute_function_to_run(key, worker=global_worker):
"""Run on arbitrary function on the worker."""
driver_id, serialized_function = worker.redis_client.hmget(
key, ["driver_id", "function"])
if (worker.mode in [SCRIPT_MODE, SILENT_MODE] and
driver_id != worker.task_driver_id.id()):
# This export was from a different driver and there's no need for this
# driver to import it.
return
try:
# Deserialize the function.
function = pickle.loads(serialized_function)