Add support for weaviate as a memory store (Python)
Motivation and Context
- Why is this change required? Add support for weaviate as a memory store
- What problem does it solve? People want to use weaviate as a memory store
- What scenario does it contribute to? See point 2
- If it fixes an open issue, please link to the issue here. #803
Description
Implement MemoryStoreBase for weaviate
Contribution Checklist
- [x] The code builds clean without any errors or warnings
- [x] The PR follows SK Contribution Guidelines (https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
- [] The code follows the .NET coding conventions (https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions) verified with
dotnet format - [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone :smile:
@awharrison-28 @tawalke how's the review going?
@awharrison-28 @tawalke how's the review going?
Hi @hsm207 thanks for checking in, it is in progress.
Would you mind ensuring the branch is updated with changes from main branch and updated code as needed. Thanks!
@hsm207 Thanks for updating, will provide more feedback as I test calls to Weaviate service shortly.
@awharrison-28 I've incorporated your feedback
Double clicking on a question: will the integration test run as is? I think an external service needs to be stood up for it run in CI?
@awharrison-28 yes, it will run as is (answered in this comment earlier). Since we are running embedded weaviate, an external service does not need to be stood up. The weaviate client will download the binary when the test is being set up.
Consider updating
FEATURE_MATRIX.mdto include these changes in theConnectors and Skill Librariessection.
@lemillermicrosoft done!
@hsm207 Looks like embedded weaviate is unix only? Could you add skips to the tests if the host system is windows?
@hsm207 Looks like embedded weaviate is unix only? Could you add skips to the tests if the host system is windows?
@awharrison-28 Embedded weaviate is linux only at the moment.
What's the teams preferred way to check for host OS and skip tests?
@hsm207
I think something like this should do the trick:
if os.name == 'nt':
is_windows=True
@pytest.mark.skipif(is_windows, reason="Embedded Weaviate is currently Linux only")
Will it fail on MacOS as well?
@awharrison-28
I think something like this should do the trick:
if os.name == 'nt': is_windows=True @pytest.mark.skipif(is_windows, reason="Embedded Weaviate is currently Linux only")Will it fail on MacOS as well?
yes, it will fail on MacOS as well. We have plans to add support for MacOS and Windows too.
I've updated the tests so that it only runs on Linux.
If you want, I can also set up a weaviate docker compose so that it will run on all platforms. Just let me know how you want to organize the files.
fixed merge conflicts and updated poetry lock
@hsm207 please run and commit poetry lock - this will account for the downstream dependencies of the weaviate client package.
@tawalke could you review this PR please?