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

fix: Restrict docling library versions to resolve dependency issues + update mypy linting packages #434

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

courtneypacheco
Copy link
Contributor

@courtneypacheco courtneypacheco commented Dec 10, 2024

Note: Resolves #439

docling-parse is automatically pulled in by docling as a dependency, and v3.0.0 of docling-parse contains breaking syntax changes that prevent our e2e builds in instructlab from succeeding. See issue in InstructLab here: instructlab/instructlab#2765

For now, we will pin docling-parse to the latest v2 release while we investigate how we can update the docling-parse syntax to use the new v3 syntax. We will also pin to docling<=2.8.3 because v2.10.0 was updated to use docling-parse>=3.0.0. See here: https://github.com/DS4SD/docling/releases/tag/v2.10.0 (Docling-parse v2 as default PDF backend)

Finally, mypy is experiencing issues with a breaking upstream change, too. By default, mypy pulls in the latest version of pydantic, which is unfortunately now incompatible with mypy as of its v2.10 release. See:

To workaround this dependency issue, I pinned the related dependency, pydantic, to <=v2.9.2 in our tox.ini file. This will force our latest mypy to use a compatible pydantic. However, note that I did also pin mypy>=1.0,<1.14. I did this as a safety measure for when the mypy maintainers inevitably fix the issue in v1.14 or later.

@mergify mergify bot added the dependencies Pull requests that update a dependency file label Dec 10, 2024
Copy link
Contributor

@bbrowning bbrowning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me - thanks for the quick fix here!

@bbrowning
Copy link
Contributor

Staging this for backport to the 0.6.x branch as well, as we'll need to cut a release with this change to fix CI as well as users installing SDG (and InstructLab) on a fresh system.

@Mergifyio backport release-v0.6

@mergify mergify bot added CI/CD Affects CI/CD configuration testing Relates to testing ci-failure and removed ci-failure labels Dec 10, 2024
`docling-parse` v3.0.0 contains breaking changes to the syntax, which is currently breaking our builds.

Also, `mypy` < v1.14  pulls in the latest version of `pydantic` by default, so this commimt hardcodes the correct span of `pydantic` versions that are compatible with `mypy` < v1.14

Finally, we want to pin `docling[tesserocr]>=2.4.2,<=2.8.3` due to breaking changes in v2.9.0 on 9 Dec 2024.

Signed-off-by: Courtney Pacheco <[email protected]>
@mergify mergify bot removed the ci-failure label Dec 10, 2024
@bbrowning
Copy link
Contributor

@courtneypacheco Would you mind editing the top message /title of the PR a bit to reflect the additional changes? Thanks!

@bbrowning
Copy link
Contributor

Oh, you already did, seemingly between when I decided to ask you to and when I typed that. Thanks for reading my mind!

@courtneypacheco courtneypacheco changed the title fix: Pin docling-parse>=2.0.0,<3.0.0 to resolve breaking issues from v3 fix: Restrict docling library versions to resolve dependency issues + update mypy linting packages Dec 10, 2024
@bbrowning
Copy link
Contributor

@Mergifyio backport release-v0.6

Copy link
Contributor

mergify bot commented Dec 10, 2024

backport release-v0.6

✅ Backports have been created

@bbrowning bbrowning merged commit 74858df into instructlab:main Dec 10, 2024
22 checks passed
bbrowning added a commit that referenced this pull request Dec 10, 2024
fix: Restrict `docling` library versions to resolve dependency issues + update `mypy` linting packages (backport #434)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/CD Affects CI/CD configuration dependencies Pull requests that update a dependency file one-approval testing Relates to testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Linter issue: mypy<1.14 pulls in incompatible dependencies due to pydandic release
2 participants