From bc3674e61b37f95d09404966f4710f75eeca7965 Mon Sep 17 00:00:00 2001 From: foefl Date: Wed, 22 Oct 2025 12:12:30 +0200 Subject: [PATCH] filter user warning about huggingface symlinks, fix typo --- src/dopt_sensor_anomalies/detection.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/dopt_sensor_anomalies/detection.py b/src/dopt_sensor_anomalies/detection.py index a7cdb09..4dd6e43 100644 --- a/src/dopt_sensor_anomalies/detection.py +++ b/src/dopt_sensor_anomalies/detection.py @@ -1,4 +1,5 @@ import csv +import warnings from os import path from pathlib import Path from typing import Any, Final, cast @@ -24,6 +25,13 @@ from dopt_sensor_anomalies import constants as const from dopt_sensor_anomalies import errors from dopt_sensor_anomalies import types as t +# Suppress the specific HuggingFace cache symlink warning +warnings.filterwarnings( + "ignore", + message=".*huggingface_hub.*cache-system uses symlinks.*", + category=UserWarning, +) + # input parameters: user-defined file_path: Path = Path(r"C:\Users\demon\Documents\EKF\Analyse_fuer_Florian\bild2.bmp") pixels_per_metric_X: float = 0.251 @@ -160,7 +168,7 @@ def measure_length( num_contours = len(filtered_cnts) if num_contours != const.NUM_VALID_ELECTRODES: raise errors.InvalidElectrodeCount( - f"Number of counted electroedes does not match the " + f"Number of counted electrodes does not match the " f"expected value: count = {num_contours}, expected = {const.NUM_VALID_ELECTRODES}" )