From 85d1e70d3f66d491b38301bdd23145fd0a40cac7 Mon Sep 17 00:00:00 2001 From: Antoine Broyelle Date: Fri, 7 Feb 2025 09:09:08 +0000 Subject: [PATCH] Limit warning filter to torchrl (#2762) --- torchrl/_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchrl/_utils.py b/torchrl/_utils.py index f999fa96c1d..5fd2acf6b41 100644 --- a/torchrl/_utils.py +++ b/torchrl/_utils.py @@ -67,7 +67,7 @@ _os_is_windows = sys.platform == "win32" RL_WARNINGS = strtobool(os.environ.get("RL_WARNINGS", "1")) if RL_WARNINGS: - warnings.simplefilter("once", DeprecationWarning) + warnings.filterwarnings("once", category=DeprecationWarning, module="torchrl") BATCHED_PIPE_TIMEOUT = float(os.environ.get("BATCHED_PIPE_TIMEOUT", "10000.0"))