Skip to content

Conversation

@ajjimeno
Copy link
Contributor

@ajjimeno ajjimeno commented Oct 21, 2025

Make OD model initialization threadsafe.


Note

Make get_model thread-safe with a lock, add a multithreaded test, and bump version to 1.0.9 with changelog update.

  • Models:
    • Thread-safe initialization in unstructured_inference/models/base.py by adding models_lock and wrapping get_model initialization path with a lock and double-check cache.
  • Tests:
    • Add test_get_model_threaded in test_unstructured_inference/models/test_model.py to validate concurrent get_model calls.
  • Versioning:
    • Bump __version__ to 1.0.9.
    • Update CHANGELOG.md with 1.0.9 entry about thread-safe OD model loading.

Written by Cursor Bugbot for commit 7609025. This will update automatically on new commits. Configure here.

@ajjimeno ajjimeno merged commit 02f6fcc into main Oct 21, 2025
15 checks passed
@ajjimeno ajjimeno deleted the fix/od-initialization-threadsafe branch October 21, 2025 20:45
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.

3 participants