Skip to content

Commit c15bc02

Browse files
committed
Add filter warning (not relevant)
1 parent 667906e commit c15bc02

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

segmentation_models_pytorch/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import warnings
2+
13
from . import datasets
24
from . import encoders
35
from . import decoders
@@ -20,6 +22,9 @@
2022
from typing import Optional as _Optional
2123
import torch as _torch
2224

25+
# Suppress the specific SyntaxWarning for `pretrainedmodels`
26+
warnings.filterwarnings("ignore", message="is with a literal", category=SyntaxWarning)
27+
2328

2429
def create_model(
2530
arch: str,

0 commit comments

Comments
 (0)