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

RAG does not correctly merge weights #5360

Closed
sjtugzx opened this issue Apr 28, 2021 · 2 comments · Fixed by #6692
Closed

RAG does not correctly merge weights #5360

sjtugzx opened this issue Apr 28, 2021 · 2 comments · Fixed by #6692
Milestone

Comments

@sjtugzx
Copy link

sjtugzx commented Apr 28, 2021

Description

Hi there,
I have a question about the example of merging RAG 1. I just wondering how does the parameters are passed to the identified function max_edge. For example, I wanna merge the node of 1 and 3, as far as I concerned the ‘src’ and ‘dst’ are supposed to be 1 and 3, however, the result is 1 and 5. Moreover, after merging these 2 nodes, if we choose the max weights, the result should be 40 and 20 but we just got 40 and 10. Obviously there is some problems about this part. Here is the link of the example code and the link from the foum.

@jni jni added the type: bug label Apr 28, 2021
@jni jni added this to the 0.19 milestone Apr 28, 2021
@jni
Copy link
Member

jni commented Apr 28, 2021

Thanks for raising @sjtugzx! Clearly there is a bug here in how the weights are handled.

Re the ID of the new node, (src, dst) indeed becomes dst if in_place=True, but otherwise, a new node is created, which requires a new node ID. So that bit is behaving as expected.

@grlee77 grlee77 modified the milestones: 0.19, 1.0 Aug 19, 2021
@lagru lagru modified the milestones: 0.21, 0.20 Oct 11, 2022
@lagru lagru changed the title Question about the example of merging RAG from the tutorial RAG does not correctly merge weights Oct 11, 2022
@lagru
Copy link
Member

lagru commented Jan 20, 2023

I think I found the bug. See #6692 for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants