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: FunctionResultContent hash fix to handle lists/sets #9978

Merged
merged 8 commits into from
Dec 16, 2024

Conversation

moonbox3
Copy link
Contributor

Motivation and Context

Currently, the hash function in FunctionResultContent does not properly handle types of list or set. Adding the proper handling to turn these into a tuple, and then the hash function works properly.

Description

This PR:

Contribution Checklist

@moonbox3 moonbox3 self-assigned this Dec 16, 2024
@moonbox3 moonbox3 requested a review from a team as a code owner December 16, 2024 04:38
@markwallace-microsoft markwallace-microsoft added the python Pull requests for the Python Semantic Kernel label Dec 16, 2024
Copy link
Member

@eavanvalkenburg eavanvalkenburg left a comment

Choose a reason for hiding this comment

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

small note

@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented Dec 16, 2024

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
semantic_kernel/agents/open_ai
   assistant_content_generation.py1551392%93–96, 114, 117–118, 350–358, 400, 402
semantic_kernel/contents
   function_result_content.py85298%163–165
semantic_kernel/functions
   kernel_function_from_prompt.py154795%167–168, 182, 203, 221, 241, 324
TOTAL16745185589% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
2966 4 💤 0 ❌ 0 🔥 1m 8s ⏱️

@moonbox3 moonbox3 enabled auto-merge December 16, 2024 22:07
@moonbox3 moonbox3 added this pull request to the merge queue Dec 16, 2024
Merged via the queue into microsoft:main with commit b427208 Dec 16, 2024
25 checks passed
@moonbox3 moonbox3 deleted the frc-hash-fix branch December 16, 2024 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Pull requests for the Python Semantic Kernel
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Python: unhashable type 'list' exception in function_result_content __hash__ function
4 participants