-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathconftest.py
More file actions
33 lines (30 loc) · 1.1 KB
/
conftest.py
File metadata and controls
33 lines (30 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Copyright 2025 ETH Zurich and University of Bologna.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
#
# Federico Brancasi <fbrancasi@ethz.ch>
"""
Pytest configuration file that suppresses specific warnings, including those
related to torch.tensor constant registration in FX tracing.
"""
import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning)
warnings.filterwarnings("ignore", category=UserWarning, message="Named tensors.*")
warnings.filterwarnings(
"ignore", category=UserWarning, message=".*__torch_function__.*"
)
warnings.filterwarnings(
"ignore", category=UserWarning, message="Was not able to add assertion.*"
)
warnings.filterwarnings(
"ignore", category=UserWarning, message="'has_cuda' is deprecated.*"
)
warnings.filterwarnings(
"ignore", category=UserWarning, message="'has_cudnn' is deprecated.*"
)
warnings.filterwarnings(
"ignore", category=UserWarning, message="'has_mps' is deprecated.*"
)
warnings.filterwarnings(
"ignore", category=UserWarning, message="'has_mkldnn' is deprecated.*"
)