Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Cannot properly disable MPS on MacOS machines #3273

@jaideepr97

Description

@jaideepr97

Describe the bug
When trying to disable the use of MPS in favor of CPU via docling, the logs seems to suggest that the switch to CPU has happened successfully only for it to later revert to MPS, which is not supported on GitHub's MacOS runners. This causes consistent CI failures on the macOS workflows

2025-04-09T16:07:13.6329450Z E                 INFO 2025-04-09 16:04:26,702 docling.utils.accelerator_utils:67: Accelerator device: 'cpu'

...

2025-04-09T16:07:13.6332140Z E                 INFO 2025-04-09 16:04:30,938 docling.document_converter:269: Going to convert document batch...
2025-04-09T16:07:13.6332720Z E                 INFO 2025-04-09 16:04:30,938 docling.document_converter:304: Initializing pipeline for StandardPdfPipeline with options hash cc1cd067af15c9d57dc891dd578c7f08
2025-04-09T16:07:13.6333300Z E                 INFO 2025-04-09 16:04:30,976 docling.models.factories.base_factory:112: Loading plugin 'docling_defaults'
2025-04-09T16:07:13.6333840Z E                 INFO 2025-04-09 16:04:30,976 docling.models.factories:16: Registered ocr engines: ['easyocr', 'ocrmac', 'rapidocr', 'tesserocr', 'tesseract']
2025-04-09T16:07:13.6334500Z E                 INFO 2025-04-09 16:04:30,976 docling.utils.accelerator_utils:67: Accelerator device: 'mps'

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
disabling MPS should be a straight forward, one time operation

Screenshots

Device Info (please complete the following information):

  • Hardware Specs: [e.g. Apple M2 Pro Chip, 16 GB Memory, etc.]
  • OS Version: [e.g. Mac OS 14.4.1, Fedora Linux 40]
  • Python Version: [output of python --version]
  • InstructLab Version: [output of ilab system info]

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions