-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Improved component model #629
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
I have no idea why the tests are failing in CI. They work locally on Python 3.7. Can't make any progress tonight, will revisit in the morning. |
levand
commented
May 30, 2023
levand
commented
May 30, 2023
HammadB
approved these changes
May 30, 2023
I still have to merge in main properly but issue is fixed. Will update soon. |
HammadB
added a commit
that referenced
this pull request
Jun 2, 2023
## Description of changes #629 was left unfinished, this completes the merge to support thin client error'ing. ## Test plan Existing tests ## Documentation Changes None required.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes
All component instances now inherit from a base
Component
class definingstart
andstop
methods, and to track their dependencies throughout the system.The
System
class has been updated to start and stop all components in dependency order.All these material changes are in
chromadb/config.py
This was necessary to properly implement testing in the new architecture. The new version of the system has more stateful components with (e.g.) active subscriptions. It is necessary to provide an explicit mechanism to shut down the whole stack or else consumers could continue operating unexpectedly in the background and not be garbage collected.
Most of the changes in this PR are to fix existing type signature errors. All components of the system are now subclasses of
EnforceOverrides
which ensures that all signatures match at runtime, and which operates independently from the type checker (so the#type: ignore
is not sufficient to fix it.)This PR also disables the
type-abstract
MyPy error code. In my opinion this is an incorrect type rule although there is [https://github.com/python/mypy/issues/4717](active discussion) on the topic.Test plan
Unit + integration tests updated and passing.
Documentation Changes
No changes to user-facing APIs.