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

Python: implement filters #5681

Merged
merged 52 commits into from
May 17, 2024
Merged

Conversation

eavanvalkenburg
Copy link
Member

@eavanvalkenburg eavanvalkenburg commented Mar 27, 2024

Motivation and Context

This pull request includes significant changes across multiple files, mainly related to the addition of hooks and the modification of function invocations in the semantic_kernel module. The changes also include the addition of a new sample and a YAML file, and modifications to the __init__.py files.

Removals:

New Exceptions:

Fixes: #3038
Fixes: #6276

Contribution Checklist

@markwallace-microsoft markwallace-microsoft added the python Pull requests for the Python Semantic Kernel label Mar 27, 2024
python/semantic_kernel/exceptions/kernel_exceptions.py Outdated Show resolved Hide resolved
python/semantic_kernel/functions/kernel_function.py Outdated Show resolved Hide resolved
python/semantic_kernel/functions/kernel_function.py Outdated Show resolved Hide resolved
python/semantic_kernel/kernel.py Outdated Show resolved Hide resolved
python/semantic_kernel/kernel.py Outdated Show resolved Hide resolved
python/semantic_kernel/kernel.py Outdated Show resolved Hide resolved
@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented Mar 28, 2024

Py3.8 Test Coverage

Python 3.8 Test Coverage Report •
FileStmtsMissCoverMissing
semantic_kernel
   kernel.py2612889%122, 124, 182–185, 187–191, 193–196, 203, 210–219, 254–257, 267–272, 277, 281–284, 466–467
semantic_kernel/connectors/ai/open_ai
   utils.py462154%27–28, 51–55, 62–63, 104, 142, 144, 146, 148, 150, 155–162
semantic_kernel/events
   function_invoking_event_args.py6183%35
   kernel_events_args.py14379%38, 41–42
semantic_kernel/functions
   function_result.py30970%45, 47–48, 58–63
   kernel_function.py72297%141, 160
   kernel_function_decorator.py67199%101
   kernel_function_from_prompt.py162498%170, 198, 299, 369
TOTAL5545101082% 

Python 3.8 Unit Test Overview

Tests Skipped Failures Errors Time
1211 11 💤 0 ❌ 0 🔥 20.899s ⏱️

Copy link
Contributor

@moonbox3 moonbox3 left a comment

Choose a reason for hiding this comment

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

I've been staring at this draft PR for a while, and I like the direction we're heading.

@eavanvalkenburg eavanvalkenburg marked this pull request as ready for review April 4, 2024 10:57
@eavanvalkenburg eavanvalkenburg requested a review from a team as a code owner April 4, 2024 10:57
Copy link
Contributor

@juliomenendez juliomenendez left a comment

Choose a reason for hiding this comment

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

This looks great! Just a couple of comments.

python/semantic_kernel/functions/kernel_function.py Outdated Show resolved Hide resolved
python/semantic_kernel/functions/kernel_function.py Outdated Show resolved Hide resolved
Copy link
Contributor

@moonbox3 moonbox3 left a comment

Choose a reason for hiding this comment

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

Awesome!!

@moonbox3 moonbox3 dismissed juliomenendez’s stale review May 17, 2024 19:40

We have 2 approvals, moving forward as-is.

@eavanvalkenburg eavanvalkenburg added this pull request to the merge queue May 17, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 17, 2024
@eavanvalkenburg eavanvalkenburg added this pull request to the merge queue May 17, 2024
github-merge-queue bot pushed a commit that referenced this pull request May 17, 2024
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
This pull request includes significant changes across multiple files,
mainly related to the addition of hooks and the modification of function
invocations in the `semantic_kernel` module. The changes also include
the addition of a new sample and a YAML file, and modifications to the
`__init__.py` files.

Removals:

*
[`python/semantic_kernel/events`](diffhunk://#diff-ebda9504832b19ab83239a92c9a6d5f8c744deff9fef86071c13956ec92bb010L1-L11):
Removed the previously used events.

New Exceptions:

*
[`python/semantic_kernel/exceptions/kernel_exceptions.py`](diffhunk://#diff-450aaa5595a8b22cd6ee212eb79b7d6b0d4e9c1072063ef32018a3e7d3fdf21dR41-R48):
Added new exception classes `OperationCancelledException` and
`HookInvalidSignatureError`.
[[1]](diffhunk://#diff-450aaa5595a8b22cd6ee212eb79b7d6b0d4e9c1072063ef32018a3e7d3fdf21dR41-R48)
[[2]](diffhunk://#diff-450aaa5595a8b22cd6ee212eb79b7d6b0d4e9c1072063ef32018a3e7d3fdf21dR57-R58)

Fixes: #3038 
Fixes: #6276

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 17, 2024
@eavanvalkenburg eavanvalkenburg added this pull request to the merge queue May 17, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 17, 2024
@eavanvalkenburg eavanvalkenburg added this pull request to the merge queue May 17, 2024
Merged via the queue into microsoft:main with commit a894aeb May 17, 2024
25 checks passed
@eavanvalkenburg eavanvalkenburg deleted the hooks branch May 17, 2024 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation python Pull requests for the Python Semantic Kernel
Projects
None yet
7 participants