Skip to content

Conversation

@mislavmartinic
Copy link
Contributor

Fixing caching same class with different options by using composite key (class, options)

TODO this will ignore if different options have been defined for the same pipeline class.

at row 292

Checklist:

  • [ x] Documentation has been updated, if necessary.
  • [ x] Examples have been added, if necessary.
  • [ x] Tests have been added, if necessary.

Fixing caching same class with different options by using composite key (class, options)

# TODO this will ignore if different options have been defined for the same pipeline class.

at row 292

Signed-off-by: mislavmartinic <mislav.martinic@pontistechnology.com>
@mergify
Copy link

mergify bot commented Mar 13, 2025

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

@mislavmartinic mislavmartinic changed the title Update document_converter.py fix: Cache same Class with different Options Mar 13, 2025
Copy link
Member

@cau-git cau-git left a comment

Choose a reason for hiding this comment

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

@mislavmartinic Many thanks for taking care of this flaw! Only one question below.

cau-git
cau-git previously approved these changes Mar 24, 2025
@cau-git cau-git changed the title fix: Cache same Class with different Options fix: Cache same pipeline class with different options Mar 24, 2025
@cau-git
Copy link
Member

cau-git commented Mar 24, 2025

LGTM!

@cau-git
Copy link
Member

cau-git commented Mar 24, 2025

@mislavmartinic Many thanks. To pass the CI checks, can you please run the pre-commit toolchain and make another commit?

pre-commit install
poetry run pre-commit run --all-files

@mislavmartinic
Copy link
Contributor Author

@mislavmartinic Many thanks. To pass the CI checks, can you please run the pre-commit toolchain and make another commit?

pre-commit install
poetry run pre-commit run --all-files

What has been requested is done.

Copy link
Member

@cau-git cau-git left a comment

Choose a reason for hiding this comment

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

LGTM

@cau-git cau-git merged commit 825b226 into docling-project:main Mar 25, 2025
8 checks passed
ClemDoum pushed a commit to ClemDoum/docling that referenced this pull request Mar 26, 2025
…ling-project#1152)

* Update document_converter.py

Fixing caching same class with different options by using composite key (class, options)

# TODO this will ignore if different options have been defined for the same pipeline class.

at row 292

Signed-off-by: mislavmartinic <mislav.martinic@pontistechnology.com>

* formatted script

* removed unnecessary hasattr check

* pre-commit chain run

---------

Signed-off-by: mislavmartinic <mislav.martinic@pontistechnology.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants