[joblib] Log once the context warning argument. (#13865)

Co-authored-by: Ameer Haj Ali <ameerhajali@ameers-mbp.lan>
Co-authored-by: Alex Wu <alex@anyscale.io>
Co-authored-by: Alex Wu <itswu.alex@gmail.com>
Co-authored-by: Eric Liang <ekhliang@gmail.com>
Co-authored-by: Ameer Haj Ali <ameerhajali@Ameers-MacBook-Pro.local>
This commit is contained in:
Ameer Haj Ali
2021-02-03 10:23:20 +02:00
committed by GitHub
parent d335ce2aab
commit 2a903b904a
+2 -1
View File
@@ -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.")