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

\docs\examples\custom_convert.py missing imports and Device object has to be AcceleratorDevice obj #724

Closed
peterbaksa opened this issue Jan 10, 2025 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@peterbaksa
Copy link

peterbaksa commented Jan 10, 2025

Bug

Just started using the example code in \docs\examples\custom_convert.py and find that there is missing:
from docling.datamodel.pipeline_options import AcceleratorDevice, AcceleratorOptions

and the object 'Device' looks that has to be object 'AcceleratorDevice' (Device object does not exists)

pipeline_options.accelerator_options = AcceleratorOptions(
        num_threads=4, device=Device.AUTO
    )

Docling version

Docling version: 2.15.1

Python version

Python version: 3.11.7

I will check the other example code, fix it and create PR.

@peterbaksa peterbaksa added the bug Something isn't working label Jan 10, 2025
@vagenas vagenas self-assigned this Jan 13, 2025
@vagenas vagenas added documentation Improvements or additions to documentation and removed bug Something isn't working labels Jan 13, 2025
@vagenas
Copy link
Contributor

vagenas commented Jan 13, 2025

Good catch! 👍

Are you still taking care of the PR or shall we quickly take it over?
FYI the reference example for accelerator support is this one.

(Meanwhile updated the label since this code is part of the docs and not of the API.)

@vagenas
Copy link
Contributor

vagenas commented Jan 27, 2025

Meanwhile addressed in 7686083 so closing this one.

@vagenas vagenas closed this as completed Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants