-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add support for netstandard2.0 #117
Conversation
It is unfortunate that SemanticKernel decided to still target NS2.0 as it gives people a wrong idea that picking .NET Framework for new code is something that can be justified outside of writing MS Office Add-Ins or Visual Studio extensions 😢 Initially, I was strictly against the idea of supporting NS2.0 - if someone is writing a standalone application, they must not, under any circumstances, use .NET FW: #46 However, because SK continues to target it, and because, if my understanding is correct, you would like to replace SKs own connector implementation with this library (or make it to be overlayed on top of it), then I suppose there is just no other choice. In either case, thank you for working on this. There is some feedback:
|
Yes, that's my plan. SK MemoryStore would wrap PineconeClient and delegate all the operations to it. Looks like they standarized on ReadOnlyMemory for the vector representation, so #87 could be valuable at some point, but I believe/hope I can get a buy-in from them with NS2 support alone, given that Pinecone.NET has so much more functionality, decent tests etc. SK APIs can use ReadOnlyMemory and will just extract array or copy into a new one under the hood for now to pass to PineconeClient.
I didn't include that package when targetting ns2 🤦♂️ works like a charm now
Makes sense, I just hacked it really quickly to see if there are any insurmountable problems further down the line. Will do proper implementation and clear out AOT warning in the actual PR.
Will do! |
ddf0601
to
3cab090
Compare
It appears that SK is now multi-targeted thanks to microsoft/semantic-kernel#4308 This is important as this means it will be able to take advantage of .NET 8 package. If SK were to integrate this, there are other areas that might be worth investigating (I'm not saying you need to do that, just noting them for posterity):
|
3cab090
to
df2b44c
Compare
another thing is Logging. It shouldn't be a blocker, since logging can just happen at PineconeMemoryStore level, but it might be worth considering exposing a logger/logger factory in Pinecone.NET |
Thanks, I have updated previous comment (will move them to issues but a bit a later). |
df2b44c
to
a071b81
Compare
Features that are used in the project and not available on NS2 (and not covered by PolySharp) have been added to the Compatibility folder. Parallel Upsert and Fetch are currently disabled on NS2, everything else should work. Fixes neon-sunset#116
a071b81
to
bb62fd8
Compare
@neon-sunset I met @westey-m from Semantic Kernel yesterday and they are OK with using Pinecone.NET to manage operations for the memory connector. They are currently in the process of re-designing the memory connector APIs, so breaking changes are not as big a problem as usually. Fortunate timing :) |
Awesome, thanks! If that is the case, it's probably better to release NS2.0 version as-is, and then, once SK decides on the new memory connector shape, Pinecone.NET could adapt accordingly, releasing version 3.0 with breaking changes if needed. PR changes LGTM. |
Makes sense. AFAICT the API is still in flux, but the general shape and design goals are somewhat baked in. I will take a stab at the new implementation using Pinecone.NET based on their feature branch, see how it goes and report feature requests here: #119 |
https://www.nuget.org/packages/Pinecone.NET/2.1.1 has been published to nuget |
First stab at the problem. Still work in progress but looks promising. Pretty much the only break is the explicit interface implementation / static abstract method on the ITransport (needs runtime changes so no way to hack it into ns2) and the new parallelization logic (Parallel.ForEachAsync). Chunk is bit much as well. Apart from that Index and Range are the only relatively complicated code that needed to be ported/copied.
I still haven't run any tests on ns2, but all the tests on 6, 7 and 8 pass without issue.