fix: Disable the TOKENIZERS_PARALLELISM in test_e2e_ocr_conversion.py to avoid warning messages from HF

Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
This commit is contained in:
Nikos Livathinos 2025-02-18 10:58:11 +01:00
parent 75db61127c
commit dadff50589

View File

@ -1,3 +1,4 @@
import os
import sys
from pathlib import Path
from typing import List
@ -53,6 +54,12 @@ def get_converter(ocr_options: OcrOptions):
def test_e2e_conversions():
r"""
End-to-end conversions with OCR
"""
# Disable parallelisation for HF tokenizers to avoid warning messages
os.environ["TOKENIZERS_PARALLELISM"] = "false"
pdf_paths = get_pdf_paths()
engines: List[OcrOptions] = [