From 69b4e22b51a9f642566ff4a4a65819bb00f1c0f6 Mon Sep 17 00:00:00 2001 From: Marko Henning Date: Mon, 29 Apr 2024 13:38:55 +0200 Subject: [PATCH] Add deprecation warning. --- scraibe/diarisation.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scraibe/diarisation.py b/scraibe/diarisation.py index 1643db2..ade9220 100644 --- a/scraibe/diarisation.py +++ b/scraibe/diarisation.py @@ -232,6 +232,10 @@ def load_model(cls, if not os.path.exists(path_to_model): warnings.warn(f"Model not found at {path_to_model}. \ 'Trying to find it nearby .bin files instead.") + warnings.warn( + 'Searching for nearby files in a folder path is ' + 'deprecated and will be removed in future versions.', + category=DeprecationWarning) # list elementes with the ending .bin bin_files = [f for f in os.listdir(pwd) if f.endswith(".bin")] if len(bin_files) == 1: