Serious bug in graphlab

User 956 | 12/7/2014, 5:07:37 PM

Hey all,

GraphLab has a curious problem with my graph. My code is:

<code class="CodeInline">edges = SFrame('edges2.csv') g = SGraph() g = g.addedges(edges, srcfield='src', dst_field='dst') g.summary() </code>

<code class="CodeInline">g.edges[g.edges['__dst_id'] == '1319']</code>

The result is: <blockquote class="Quote">src_id dst_id 74 1319</blockquote>

But, when you take a look into edges2.csv, there are just two lines containing 1319: <blockquote class="Quote">"150", "1319" and "1319", "1145"</blockquote>

I am running GraphLab 1.1, on MacOSX 10.10, i7, 8gb, iPython and GraphLab in virtualenv.

Looking forward to get a solution for that problem. Tarek

P.s.: I had to rename edges2.csv to edges.txt, due to fit the forum requirements.


User 6 | 12/8/2014, 7:06:26 AM

This is not a bug! The graph edges are directed. If you like to have an undirected graph, you need to run the following code: <pre class="CodeBlock"><code>edges = SFrame('edges2.csv') g = SGraph() g = g.addedges(edges, srcfield='src', dstfield='dst') g = g.addedges(edges, srcfield='dst', dstfield='src') g.summary()

g.edges[g.edges['__dst_id'] == '1319']</code></pre>

User 956 | 12/8/2014, 8:06:15 AM

I know that it's directed.

But the tupel 74, 1319 is not part of esges2.csv

User 6 | 12/8/2014, 1:49:35 PM

Not sure what is your question. You can always query for <code class="CodeInline">g.edges[g.edges['__src_id'] == '1319']</code> instead

User 956 | 12/8/2014, 3:07:58 PM

No, when you take a look into edges.csv,

There is no edge between 74 and 1319.

User 1037 | 12/8/2014, 8:33:39 PM

Sorry, @Tarek. This is a bug and we are working on fixing it.

User 1037 | 12/8/2014, 8:34:24 PM

@Tarek, meanwhile, you can use g.get_edges which gives you the capability of edge query and returns the correct answer.

User 956 | 12/8/2014, 8:42:25 PM

Okay thanks for fixing and good to know, that I can use g.get_edges.

User 1037 | 12/9/2014, 7:47:01 PM

Hi @Tarek, I want to let you know that this bug has been fixed and it will be included in the next release.

This is a really subtle bug which has been hiding deeply in the lazy evaluation pipeline of the SFrame since 0.9. It only reveals itself when SFrame transform, append and logical_filter is used together.

Thanks for reporting and providing us with a clean re-pro.

Best, Jay