Skip to content

refactor: registry package split#2278

Draft
akoumpa wants to merge 5 commits into
mainfrom
akoumpa/refactor/registry-package-split
Draft

refactor: registry package split#2278
akoumpa wants to merge 5 commits into
mainfrom
akoumpa/refactor/registry-package-split

Conversation

@akoumpa
Copy link
Copy Markdown
Contributor

@akoumpa akoumpa commented May 19, 2026

What does this PR do ?

  • Splits monolithic _transformers/registry.py into a package:
    registry/base.py, model_package_spec.py, model_registry.py, and __init__.py.
  • Introduces ModelPackageSpec as the shared metadata format for model registration, architectures, model types, and config registration.
  • Keeps model classes lazy-loaded while moving lookup/indexing logic into _BaseModelRegistry.
  • Adds a separate RetrievalModelRegistry and RETRIEVAL_MODEL_PACKAGE_SPECS.
  • Moves bidirectional retrieval models out of the main model registry and into the retrieval registry.
  • Updates retrieval code to use RetrievalModelRegistry directly.
  • Removes register_retrieval() and has_retrieval_model().
  • Updates model init and coverage tests to use the new registry package APIs.
  • Expands tests for lazy loading, dynamic registration, config registration, registry exports, retrieval separation, and deprecation warnings.
  • Validation run passed: 108 passed, 5 deselected.

Zoo refactor pt.1

Changelog

  • Add specific line by line info of high level changes in this PR.

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you add or update any necessary documentation?

If you haven't finished some of the above items you can still open "Draft" PR.

Additional Information

  • Related to # (issue)

akoumpa added 3 commits May 18, 2026 18:56
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented May 19, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@akoumpa
Copy link
Copy Markdown
Contributor Author

akoumpa commented May 19, 2026

/ok to test e003c16

akoumpa added 2 commits May 18, 2026 22:03
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
@akoumpa
Copy link
Copy Markdown
Contributor Author

akoumpa commented May 19, 2026

/ok to test c2e70b7

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.

1 participant