Of course. You can do like this:
import warnings
from torch.serialization import SourceChangeWarning
warnings.filterwarnings("ignore", category=SourceChangeWarning)

As the example suggested, you need to identify a specific warning you want to suppress, which is usually indicated in original warning messages.