mirror of
https://github.com/DS4SD/docling.git
synced 2025-12-08 12:48:28 +00:00
feat: Support for Python 3.14 (#2530)
* fix dependencies for py314 Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * add metadata and CI tests Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * add back gliner Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * update error message about python 3.14 availability Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * skip tests which cannot run on py 3.14 Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * fix lint Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * remove vllm from py 3.14 deps Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * safe import for vllm Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * update lock Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * remove torch.compile() Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * update checkbox results after docling-core changes Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * cannot run mlx example in CI Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * add test for rapidocr backends and skip onnxruntime on py3.14 Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * fix other occurances of torch.compile() Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * allow torch.compile for Python <3.14. proper support will be introduced with new torch releases Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> --------- Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
This commit is contained in:
@@ -16,9 +16,9 @@
|
||||
|
||||
استاندارد اجباری است؟
|
||||
|
||||
بلی
|
||||
- [ ] بلی
|
||||
|
||||
خير
|
||||
- [x] خير
|
||||
|
||||
مرجع صادرکننده استاندارد
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
آيا توليدکننده محصول، استاندارد مذکور را اخذ نموده است؟
|
||||
|
||||
بلی خير
|
||||
- [x] بلی خير
|
||||
|
||||
## -3 پذيرش در بورس
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from unittest.mock import Mock, patch
|
||||
|
||||
@@ -10,6 +11,11 @@ from docling.datamodel.pipeline_options import AsrPipelineOptions
|
||||
from docling.document_converter import AudioFormatOption, DocumentConverter
|
||||
from docling.pipeline.asr_pipeline import AsrPipeline
|
||||
|
||||
pytestmark = pytest.mark.skipif(
|
||||
sys.version_info >= (3, 14),
|
||||
reason="Python 3.14 is not yet supported by whisper dependencies.",
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def test_audio_path():
|
||||
|
||||
@@ -70,13 +70,19 @@ def test_e2e_conversions():
|
||||
(EasyOcrOptions(force_full_page_ocr=True), False),
|
||||
]
|
||||
|
||||
# rapidocr is only available for Python >=3.6,<3.13
|
||||
if sys.version_info < (3, 13):
|
||||
engines.append((RapidOcrOptions(), False))
|
||||
engines.append((RapidOcrOptions(force_full_page_ocr=True), False))
|
||||
for rapidocr_backend in ["onnxruntime", "torch"]:
|
||||
if sys.version_info >= (3, 14) and rapidocr_backend == "onnxruntime":
|
||||
# skip onnxruntime backend on Python 3.14
|
||||
continue
|
||||
|
||||
engines.append((RapidOcrOptions(backend=rapidocr_backend), False))
|
||||
engines.append(
|
||||
(RapidOcrOptions(backend=rapidocr_backend, force_full_page_ocr=True), False)
|
||||
)
|
||||
engines.append(
|
||||
(
|
||||
RapidOcrOptions(
|
||||
backend=rapidocr_backend,
|
||||
force_full_page_ocr=True,
|
||||
rec_font_path="test",
|
||||
rapidocr_params={"Rec.font_path": None}, # overwrites rec_font_path
|
||||
|
||||
Reference in New Issue
Block a user