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: Feature new memory stores and collections #7614

Merged
merged 9 commits into from
Aug 6, 2024

Conversation

eavanvalkenburg
Copy link
Member

Motivation and Context

This PR adds new vector store and vector store record collections as well as implementations for:

  • Azure AI Search
  • Redis
  • Qdrant
  • Volatile (in-memory)

It also adds samples, tests, and unit-tests for these.

Next it adds the vector store record fields, definition and decorator, with tests and samples.

All marked experimental. Existing Redis, Azure AI Search, Qdrant and Volatile will be marked as deprecated in the future, once the new collections are feature complete.

Description

Contribution Checklist

@eavanvalkenburg eavanvalkenburg requested a review from a team as a code owner August 2, 2024 13:14
@eavanvalkenburg eavanvalkenburg marked this pull request as draft August 2, 2024 13:14
@markwallace-microsoft markwallace-microsoft added python Pull requests for the Python Semantic Kernel memory labels Aug 2, 2024
@eavanvalkenburg eavanvalkenburg force-pushed the feature-python-memory branch 2 times, most recently from 75ec463 to ee08236 Compare August 6, 2024 14:20
@eavanvalkenburg eavanvalkenburg marked this pull request as ready for review August 6, 2024 14:32
@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented Aug 6, 2024

Python Test Coverage

Python Test Coverage Report
FileStmtsMissCoverMissing
semantic_kernel
   kernel.py2014777%150, 161, 165, 315–318, 427, 441–484
semantic_kernel/agents/open_ai
   open_ai_assistant_base.py385299%301–302
semantic_kernel/connectors/ai/azure_ai_inference/services
   azure_ai_inference_chat_completion.py149497%169, 312, 416, 430
semantic_kernel/connectors/ai/embeddings
   embedding_generator_base.py8188%50
semantic_kernel/connectors/ai/google
   shared_utils.py39295%100, 122
semantic_kernel/connectors/ai/google/google_ai/services
   google_ai_chat_completion.py145398%149, 251, 287
   utils.py63395%139, 157–162
semantic_kernel/connectors/ai/google/vertex_ai/services
   utils.py65395%141, 159–164
   vertex_ai_chat_completion.py145398%143, 244, 280
semantic_kernel/connectors/ai/hugging_face/services
   hf_text_completion.py54394%97, 105, 136
   hf_text_embedding.py32584%79–83
semantic_kernel/connectors/memory/redis
   redis_collection.py157299%145, 313
   utils.py451176%145–146, 164, 166, 173–188
semantic_kernel/connectors/openapi_plugin
   openapi_manager.py58297%110–111
   openapi_parser.py88199%127
   openapi_runner.py105298%181–182
semantic_kernel/connectors/openapi_plugin/models
   rest_api_operation.py129199%242
semantic_kernel/contents
   function_call_content.py97199%201
semantic_kernel/data
   vector_store_record_collection.py2491992%400, 460–464, 472–476, 516–519, 526–529
   vector_store_record_utils.py26292%50, 52
semantic_kernel/functions
   kernel_function_decorator.py98199%102
   kernel_function_from_method.py96199%153
   kernel_function_from_prompt.py154795%165–166, 180, 201, 219, 239, 322
   kernel_plugin.py187299%472, 475
semantic_kernel/planners
   plan.py2344581%54, 163–165, 197, 214–227, 264, 269, 277–278, 288–291, 308, 313, 329, 332–337, 355, 360, 363, 365, 372, 386–388, 393–397
semantic_kernel/planners/function_calling_stepwise_planner
   function_calling_stepwise_planner.py116497%145, 189–190, 198
semantic_kernel/planners/sequential_planner
   sequential_planner.py64691%71, 75, 109, 125, 134–135
   sequential_planner_extensions.py50982%31–32, 56, 110–124
   sequential_planner_parser.py771284%66–74, 93, 117–120
semantic_kernel/schema
   kernel_json_schema_builder.py119596%50, 84, 206, 210–211
semantic_kernel/template_engine/blocks
   code_block.py77199%119
   named_arg_block.py43198%98
semantic_kernel/utils/telemetry
   decorators.py113496%232, 240, 243, 252
   user_agent.py16288%18–19
TOTAL987721798% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
2244 1 💤 0 ❌ 0 🔥 54.493s ⏱️

eavanvalkenburg and others added 8 commits August 6, 2024 21:31
<!-- 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.
-->

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

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

- [ ] The code builds clean without any errors or warnings
- [ ] 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
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
### 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.
-->
Adds volatile store and collection using the new model.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### 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
- [x] I didn't break anyone 😄
### 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.
-->
is full text searchable option for vector store data record fields.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### 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
- [x] I didn't break anyone 😄
### 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.
-->
Small text changes and improved logic for key fields.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### 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
- [x] I didn't break anyone 😄
@eavanvalkenburg eavanvalkenburg added this pull request to the merge queue Aug 6, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 6, 2024
@eavanvalkenburg eavanvalkenburg added this pull request to the merge queue Aug 6, 2024
@moonbox3 moonbox3 removed this pull request from the merge queue due to a manual request Aug 6, 2024
@moonbox3 moonbox3 added this pull request to the merge queue Aug 6, 2024
Merged via the queue into main with commit 1356d5f Aug 6, 2024
28 checks passed
@moonbox3 moonbox3 deleted the feature-python-memory branch August 6, 2024 20:40
LudoCorporateShark pushed a commit to LudoCorporateShark/semantic-kernel that referenced this pull request Aug 25, 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 PR adds new vector store and vector store record collections as
well as implementations for:

- Azure AI Search
- Redis
- Qdrant
- Volatile (in-memory)

It also adds samples, tests, and unit-tests for these.

Next it adds the vector store record fields, definition and decorator,
with tests and samples.

All marked experimental. Existing Redis, Azure AI Search, Qdrant and
Volatile will be marked as deprecated in the future, once the new
collections are feature complete.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### 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
- [x] I didn't break anyone 😄
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
memory python Pull requests for the Python Semantic Kernel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants