Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: module 'torch.compiler' has no attribute 'is_compiling' error #611

Open
willfinnigan opened this issue Dec 16, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@willfinnigan
Copy link

Bug

Getting a AttributeError: module 'torch.compiler' has no attribute 'is_compiling' error which is caused by a function call in the transformers library.

Downgrading to transformers-4.44.2 fixed this for me.
...

Steps to reproduce

from docling.document_converter import DocumentConverter

from docling.datamodel.base_models import InputFormat
from docling.document_converter import DocumentConverter, PdfFormatOption
from docling.datamodel.pipeline_options import PdfPipelineOptions, TableFormerMode

pipeline_options = PdfPipelineOptions(do_table_structure=True)
pipeline_options.table_structure_options.do_cell_matching = False
pipeline_options.table_structure_options.mode = TableFormerMode.ACCURATE

converter = DocumentConverter(
    format_options={
        InputFormat.PDF: PdfFormatOption(pipeline_options=pipeline_options)
    }
)


doc = converter.convert(pdf_path)
mkdown = doc.document.export_to_markdown()

print(mkdown)

Docling version

deepsearch-glm-1.0.0 docling-2.12.0 docling-ibm-models-3.1.0 docling-parse-3.0.0 transformers-4.47.0
...

Python version

Python 3.11.11
I am running a M1 Macbook pro
...

@willfinnigan willfinnigan added the bug Something isn't working label Dec 16, 2024
@wzdavid
Copy link

wzdavid commented Dec 24, 2024

Met the same problem and had to downgrade transformers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants