Skip to content

Commit 5f4c7da

Browse files
antoinebrlVincent Moens
authored andcommitted
Limit warning filter to torchrl (#2762)
(cherry picked from commit 85d1e70)
1 parent 3d26406 commit 5f4c7da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torchrl/_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
_os_is_windows = sys.platform == "win32"
6868
RL_WARNINGS = strtobool(os.environ.get("RL_WARNINGS", "1"))
6969
if RL_WARNINGS:
70-
warnings.simplefilter("once", DeprecationWarning)
70+
warnings.filterwarnings("once", category=DeprecationWarning, module="torchrl")
7171

7272
BATCHED_PIPE_TIMEOUT = float(os.environ.get("BATCHED_PIPE_TIMEOUT", "10000.0"))
7373

0 commit comments

Comments
 (0)