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: bug fixes from graphrag insights #10270

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

eavanvalkenburg
Copy link
Member

Motivation and Context

Based on insights from the graphrag team, several bug fixes related to data and model validators.

Description

For all cases of model_validator in before mode, there is no guarantee that the data passed is a dict,
especially when a model is used as a field in another model, then a string is passed to the before validator.
So in those cases we check before doing logic, otherwise just pass it on and let Pydantic handle the invalid data.

Some small logic fixes in the vector store model decorator:

  • updated docstring with the right exceptions
  • additional checks on attributes
  • additional checks on VectorFields with tests

Contribution Checklist

@eavanvalkenburg eavanvalkenburg requested a review from a team as a code owner January 23, 2025 12:35
@markwallace-microsoft markwallace-microsoft added python Pull requests for the Python Semantic Kernel memory labels Jan 23, 2025
@markwallace-microsoft
Copy link
Member

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
semantic_kernel/agents/group_chat
   broadcast_queue.py74199%37
semantic_kernel/connectors/ai/open_ai/prompt_execution_settings
   open_ai_prompt_execution_settings.py101298%127, 141
semantic_kernel/data/text_search
   text_search.py75297%269–271
   utils.py30293%57–58
semantic_kernel/functions
   kernel_function_from_prompt.py155795%168–169, 183, 204, 222, 242, 325
semantic_kernel/processes/local_runtime
   local_step.py16410039%62, 72, 81–169, 173, 177, 181–182, 187–249, 253–256, 260–263, 267–276, 282–285, 289–291
TOTAL16749178289% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
3012 4 💤 0 ❌ 0 🔥 1m 27s ⏱️

@eavanvalkenburg eavanvalkenburg added this pull request to the merge queue Jan 23, 2025
Merged via the queue into microsoft:main with commit e44f70d Jan 23, 2025
27 checks passed
@eavanvalkenburg eavanvalkenburg deleted the gr_fixes branch January 23, 2025 20:32
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