From 2a903b904a3f9f0cb44118337cc975db1a12e24b Mon Sep 17 00:00:00 2001 From: Ameer Haj Ali Date: Wed, 3 Feb 2021 10:23:20 +0200 Subject: [PATCH] [joblib] Log once the context warning argument. (#13865) Co-authored-by: Ameer Haj Ali Co-authored-by: Alex Wu Co-authored-by: Alex Wu Co-authored-by: Eric Liang Co-authored-by: Ameer Haj Ali --- python/ray/util/multiprocessing/pool.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/ray/util/multiprocessing/pool.py b/python/ray/util/multiprocessing/pool.py index 9910bc3a4..b74e10279 100644 --- a/python/ray/util/multiprocessing/pool.py +++ b/python/ray/util/multiprocessing/pool.py @@ -9,6 +9,7 @@ import queue import copy import ray +from ray.util import log_once logger = logging.getLogger(__name__) @@ -336,7 +337,7 @@ class Pool: self._maxtasksperchild = maxtasksperchild or -1 self._actor_deletion_ids = [] - if context: + if context and log_once("context_argument_warning"): logger.warning("The 'context' argument is not supported using " "ray. Please refer to the documentation for how " "to control ray initialization.")