-
Notifications
You must be signed in to change notification settings - Fork 7
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
Update SQL backend to support SQLAlchemy 2.x #45
Conversation
…odes/edges, add edge index
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow @davidmezzetti this is really great stuff! Thank you for the great improvements here!
Running some basic workloads on this today and will merge asap!
self._edge_table.create(self._engine, checkfirst=True) | ||
|
||
# Create source and target index | ||
sindex = Index("edge_source", source_column) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
https://github.com/aplbrain/grand/actions/runs/8649244221/job/23717215080?pr=45#step:6:22 @davidmezzetti Some failing tests — looks like it's a matter of deduplicating edges? |
Let me take a look. I didn't see that tests were available. I'll reproduce locally and push a new commit with the fix. |
Awesome, let me know if you run into any trouble! SHOULD be as simple as running |
Ok, I just checked in a change that fixes the unit tests. One of the errors didn't properly convert the logic to SQLAlchemy 2.x. The other one is related to the new edge source and target indexes. Previously, when that index wasn't there, the unit tests used the default sort order of the table when pulling edges, which typically uses the primary key. An order_by clause was added to sort by the primary key. Alternatively, the |
Looks like this failure is due to not being able to build |
My thoughts exactly — want to remove 3.7 and add 3.11?
…On Thu, Apr 11, 2024 at 3:37 PM David Mezzetti ***@***.***> wrote:
Looks like this failure is due to not being able to build networkit for
3.7. Perhaps 3.7 should be removed given it's long been EOL?
—
Reply to this email directly, view it on GitHub
<#45 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFJKBZOJRP2WYOXUMZ5QHTY43RBBAVCNFSM6AAAAABGCQVQUWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJQGM4DQNBVGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Just made that change to the build script. |
Whew — thank you!! Looking good, good to merge once these pass? |
Good from my end. I'm putting together an example project for txtai that shows how to store all components in Postgres. This will help with the Graph piece and it's really cool how this integrates with the previous work with openCypher! |
Hi @j6k4m8 - I wanted to check and see if there were plans to push a new release anytime soon. I'm leaning towards integrating the database graph component as a core feature but would need this change to add the dependency. |
[edit] @davidmezzetti I just pushed it, thanks for the bump! |
Great, thank you! |
Hi @j6k4m8
Once again thank you for this compelling series of graph-related libraries!
I am working to use
grand
as aNetworkX
compatible backend withPostgres
. The main issue I ran into is compatibility with SQLAlchemy 2.x. This PR adds support for that.This PR also adds a few performance improvements.
A couple other performance improvements were possible using what's already provided in the library (i.e. caching). So overall, with these changes, I'm add to get solid performance with large graphs stored in Postgres.