-
Notifications
You must be signed in to change notification settings - Fork 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
Python: Merge Kernel, KernelBase, KernelExtensions #1015
Merged
dluc
merged 14 commits into
microsoft:main
from
awharrison-28:python/remove_kernel_base_class
May 17, 2023
Merged
Python: Merge Kernel, KernelBase, KernelExtensions #1015
dluc
merged 14 commits into
microsoft:main
from
awharrison-28:python/remove_kernel_base_class
May 17, 2023
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
alexchaomander
previously approved these changes
May 15, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glad we're cleaning this up!
dluc
previously approved these changes
May 15, 2023
mkarle
reviewed
May 16, 2023
mkarle
approved these changes
May 16, 2023
awharrison-28
added
the
PR: ready to merge
PR has been approved by all reviewers, and is ready to merge.
label
May 17, 2023
andhesky
pushed a commit
to andhesky/semantic-kernel
that referenced
this pull request
May 18, 2023
### Motivation and Context The separation of Kernel, KernelBase, and KernelExtensions is several layers of unnecessary abstraction. This PR does not change any API or kernel behavior - it just reduces the number of files and namespaces to accomplish the same functionality. ### Description - Removed the `semantic_kernel/kernel_extensions` namespace. Methods that existed in this namespace now exist in kernel.py. - Removed KernelBase - this abstract class implies that there are multiple ways to instantiate SK. For Python, we expect only a single type of Kernel to instantiated for all instances. - Updated tests and imports to accommodate the above changes.
shawncal
pushed a commit
to johnoliver/semantic-kernel
that referenced
this pull request
May 19, 2023
### Motivation and Context The separation of Kernel, KernelBase, and KernelExtensions is several layers of unnecessary abstraction. This PR does not change any API or kernel behavior - it just reduces the number of files and namespaces to accomplish the same functionality. ### Description - Removed the `semantic_kernel/kernel_extensions` namespace. Methods that existed in this namespace now exist in kernel.py. - Removed KernelBase - this abstract class implies that there are multiple ways to instantiate SK. For Python, we expect only a single type of Kernel to instantiated for all instances. - Updated tests and imports to accommodate the above changes.
5 tasks
lemillermicrosoft
pushed a commit
that referenced
this pull request
May 19, 2023
### Motivation and Context Use of abstraction was not consistent in the python SK. This PR makes the import and use of ABC consistent and removes unused file kernel.py. ### Description - MemoryStoreBase derives from ABC - this properly sets its metaclass. MemoryStoreBase itself should never be instantiated, only derived. - RetryMechanism derives ABC, so should be named 'Base' like all other derivatives of ABC in this repo. - removed kernel_base.py, was made obsolete by #1015
shawncal
pushed a commit
to shawncal/semantic-kernel
that referenced
this pull request
Jul 6, 2023
### Motivation and Context Use of abstraction was not consistent in the python SK. This PR makes the import and use of ABC consistent and removes unused file kernel.py. ### Description - MemoryStoreBase derives from ABC - this properly sets its metaclass. MemoryStoreBase itself should never be instantiated, only derived. - RetryMechanism derives ABC, so should be named 'Base' like all other derivatives of ABC in this repo. - removed kernel_base.py, was made obsolete by microsoft#1015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
PR: ready to merge
PR has been approved by all reviewers, and is ready to merge.
python
Pull requests for the Python Semantic Kernel
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.
Motivation and Context
The separation of Kernel, KernelBase, and KernelExtensions is several layers of unnecessary abstraction. This PR does not change any API or kernel behavior - it just reduces the number of files and namespaces to accomplish the same functionality.
Description
semantic_kernel/kernel_extensions
namespace. Methods that existed in this namespace now exist in kernel.py.Contribution Checklist
dotnet format