From efe75fd9e8bf774e16b8fde4775f2c9e9401fe5b Mon Sep 17 00:00:00 2001 From: Antoine Broyelle Date: Wed, 5 Feb 2025 18:34:16 +0000 Subject: [PATCH] Limit warning filter to torchrl --- 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"))