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

Add registry functions to instantiate models by provider #428

Merged
merged 17 commits into from
Apr 24, 2024

Conversation

rmitsch
Copy link
Collaborator

@rmitsch rmitsch commented Jan 24, 2024

Description

Add registry functions to instantiate models by provider. Older, model-specific registry functions will still be available to maintain backwards compatibility, but will not be advertised in the documentation anymore.

Corresponding documentation PR

explosion/spaCy#13288

Types of change

Refactoring.

Checklist

  • I confirm that I have the right to submit this contribution under the project's MIT license.
  • I ran all tests in tests and usage_examples/tests, and all new and existing tests passed. This includes
    • all external tests (i. e. pytest ran with --external)
    • all tests requiring a GPU (i. e. pytest ran with --gpu)
  • My changes don't require a change to the documentation, or if they do, I've added all required information.

@rmitsch rmitsch added refactoring Refactoring of existing code feat/model Feature: models labels Jan 24, 2024
@rmitsch rmitsch added the Test external Run external tests label Jan 30, 2024
@rmitsch rmitsch marked this pull request as ready for review January 30, 2024 11:26
@rmitsch rmitsch mentioned this pull request Feb 7, 2024
3 tasks
Copy link
Member

@svlandeg svlandeg left a comment

Choose a reason for hiding this comment

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

This makes a lot of sense, and it'll be great to make this change before 1.0.0. Virtually good to merge once my few small comments/questions are adressed.

spacy_llm/models/hf/registry.py Show resolved Hide resolved
spacy_llm/models/rest/openai/registry.py Outdated Show resolved Hide resolved
@svlandeg
Copy link
Member

Did you run the GPU tests?

@rmitsch
Copy link
Collaborator Author

rmitsch commented Mar 21, 2024

Did you run the GPU tests?

This passes local GPU tests.

@rmitsch rmitsch merged commit ff07682 into main Apr 24, 2024
17 checks passed
@svlandeg svlandeg deleted the refactor/model-registry-by-provider branch April 24, 2024 22:17
svlandeg added a commit that referenced this pull request May 17, 2024
svlandeg added a commit that referenced this pull request May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat/model Feature: models refactoring Refactoring of existing code Test external Run external tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants