From b7d3d3589d60c2ca271c467b7f0d3063ea03e037 Mon Sep 17 00:00:00 2001 From: Siddharth Singh Rana <91743459+NIXBLACK11@users.noreply.github.com> Date: Sun, 19 Nov 2023 21:53:08 +0530 Subject: [PATCH] Added warning for using laser2 with a language --- laser_encoders/models.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/laser_encoders/models.py b/laser_encoders/models.py index f6f4bc1d..b22f733f 100644 --- a/laser_encoders/models.py +++ b/laser_encoders/models.py @@ -17,6 +17,7 @@ import os import re import sys +import warnings from collections import namedtuple from pathlib import Path @@ -390,9 +391,7 @@ def __init__( ): if laser == "laser2" and lang is not None: - print( - "Warning: The 'lang' parameter is optional when using 'laser2'. It will be ignored." - ) + warnings.warn("Warning: The 'lang' parameter is optional when using 'laser2'. It will be ignored.") if laser == "laser3" and lang is None: raise ValueError("For 'laser3', the 'lang' parameter is required.")