generated from dopt-python/py311
filter user warning about huggingface symlinks, fix typo
This commit is contained in:
parent
c45411e8ee
commit
bc3674e61b
@ -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}"
|
||||
)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user