semantic-kernel icon indicating copy to clipboard operation
semantic-kernel copied to clipboard

CosmosDB memory connector improvement

Open JohnMasen opened this issue 2 years ago • 7 comments

Motivation and Context

Description

  1. Use UDF for cosin simularity calculation, reduce network IO
  2. Improve collection existance check performance
  3. Create a base class for memory storage connectors, this make further connectors easier to test
  4. Various bugs fixed (not found in issues, but found in unit tests)

I'm experienced in C#, but not experienced in Github PR. please feel free to contact me if you have any questions or suggestions about this PR.

Contribution Checklist

  • [Y] The code builds clean without any errors or warnings
  • [Y] The PR follows SK Contribution Guidelines (https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
  • [Y] The code follows the .NET coding conventions (https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions) verified with dotnet format
  • [Y] All unit tests pass, and I have added new tests where possible
  • [Y] I didn't break anyone :smile:

JohnMasen avatar Apr 19 '23 16:04 JohnMasen

@microsoft-github-policy-service agree

JohnMasen avatar Apr 19 '23 16:04 JohnMasen

Seems the file Connectors.Memory.CosmosDB.csproj was broken after manually solve conflict. Any thing I can do to fix this?

JohnMasen avatar Apr 20 '23 14:04 JohnMasen

Hi, seems some class files are NOT included in the project file "Connectors.Memory.CosmosDB.csproj". The possible reason is my code base did not synced with lastest. Anyway to fix this? Or I can try create a new PR and abandon this one, please tell me if you need to redo the PR.

JohnMasen avatar Apr 23 '23 09:04 JohnMasen

Hi, seems some class files are NOT included in the project file "Connectors.Memory.CosmosDB.csproj". The possible reason is my code base did not synced with lastest. Anyway to fix this? Or I can try create a new PR and abandon this one, please tell me if you need to redo the PR.

@JohnMasen Please ensure your PR branch builds and passes tests. You can resolve it in whatever fashion you want - copying files in conflict over from main and resolving locally may be less work than starting from a fresh branch.

awharrison-28 avatar Apr 26 '23 00:04 awharrison-28

Hi, seems some class files are NOT included in the project file "Connectors.Memory.CosmosDB.csproj". The possible reason is my code base did not synced with lastest. Anyway to fix this? Or I can try create a new PR and abandon this one, please tell me if you need to redo the PR.

@JohnMasen Please ensure your PR branch builds and passes tests. You can resolve it in whatever fashion you want - copying files in conflict over from main and resolving locally may be less work than starting from a fresh branch.

Hi, I found the cosmosDB unit tests are failed because of CosmosDB unit test requires local cosmosDB emulator. The previous version does not have unit tests. Seems I have to disable the the unit tests for this PR.

JohnMasen avatar Apr 27 '23 01:04 JohnMasen

Hi, seems some class files are NOT included in the project file "Connectors.Memory.CosmosDB.csproj". The possible reason is my code base did not synced with lastest. Anyway to fix this? Or I can try create a new PR and abandon this one, please tell me if you need to redo the PR.

@JohnMasen Please ensure your PR branch builds and passes tests. You can resolve it in whatever fashion you want - copying files in conflict over from main and resolving locally may be less work than starting from a fresh branch.

@awharrison-28 the conflicts are solved, PR is ready for review.

JohnMasen avatar Apr 28 '23 00:04 JohnMasen

Hi, seems some class files are NOT included in the project file "Connectors.Memory.CosmosDB.csproj". The possible reason is my code base did not synced with lastest. Anyway to fix this? Or I can try create a new PR and abandon this one, please tell me if you need to redo the PR.

@JohnMasen Please ensure your PR branch builds and passes tests. You can resolve it in whatever fashion you want - copying files in conflict over from main and resolving locally may be less work than starting from a fresh branch.

@awharrison-28 the conflicts are solved, PR is ready for review.

hi @awharrison-28, I found the merge failed the integration tests. as the cosmosDB requires a real cosmosDB account or a local cosmosDB emulator(Windows only), is there anyway we can add a valid CosmosDB configuration to the integration environment?

JohnMasen avatar May 05 '23 01:05 JohnMasen

Closing this PR due to cosmosDB connector is deprecated.

JohnMasen avatar May 24 '23 01:05 JohnMasen