[PowerGraph] Why I got this result when running loopy belief propagation in PowerGraph master

User 1043 | 1/12/2015, 6:35:28 PM

I ran loopy belief propagation in PowerGraph master to estimate the posterior probability. My command it /lbpstructuredprediction --prior weightsmapuse.txt --graph edge2.input --output sivagraphlablbp.tsv --engine synchronous --engineopts maxiterations=100

My input is head weightsmapuse.txt 72382 0.0075188 7556 0.0209125 657 0.0231214 23058 0.0018797 199 0.00353982 1973 0.0172166 41789 0.0110236 276178 1 616383 0.444444 2836257 1

head edge2.input 0 1 1 4 5 1 6 7 1 12 14 1 25 26 1 31 32 1 33 34 1 35 36 1 41 42 1 41 43 1

I found in my output, all posterior is estimated to be 1 for all the nodes. I found it only runs 1 iteration:

INFO: mpitools.hpp(init:63): MPI Support was not compiled. INFO: dc.cpp(distributedcontrol:127): Shared Memory Execution INFO: dctcpcomm.cpp(openlistening:411): Proc 0 listening on 43591 INFO: dctcpcomm.cpp(connect:432): Trying to connect from 0 -> 0 on port 43591 INFO: dctcpcomm.cpp(connect:435): Destination IP = 127.0.0.1 INFO: dctcpcomm.cpp(connect:467): connection from 0 to 0 established. INFO: dctcpcomm.cpp(accepthandler:487): Listening thread launched. INFO: dctcpcomm.cpp(accepthandler:493): Accepting.... INFO: dctcpcomm.cpp(accepthandler:498): Accepted INFO: dctcpcomm.cpp(newsocket:375): Incoming connection from 127.0.0.1 INFO: dctcpcomm.cpp(newsocket:384): Proc 0 accepted connection from machine 0 INFO: dctcpcomm.cpp(accepthandler:548): Listening thread quitting INFO: dctcpcomm.cpp(receiveloop:588): Receive loop Started INFO: dctcpcomm.cpp(sendloop:647): Send loop Started INFO: dc.cpp(init:571): TCP Communication layer constructed. INFO: dc.cpp(init:573): Cluster of 1 instances created. INFO: metricsserver.cpp(launchmetricserver:219): Metrics server now listening on INFO: distributedgraph.hpp(setingressmethod:3201): Automatically determine ingress method: grid INFO: distributedgraph.hpp(loadfromposixfs:2190): Loading graph from file: ./weightsmapuse.txt INFO: distributedgraph.hpp(loadfromposixfs:2190): Loading graph from file: ./edge2.input INFO: distributedgraph.hpp(finalize:702): Distributed graph: enter finalize INFO: distributedingressbase.hpp(finalize:199): Finalizing Graph... INFO: memoryinfo.cpp(logusage:90): Memory Info: Post Flush Heap: 560 MB Allocated: 551.377 MB INFO: distributedingressbase.hpp(finalize:259): Graph Finalize: constructing local graph INFO: memoryinfo.cpp(logusage:90): Memory Info: Finished populating local graph. Heap: 973.062 MB Allocated: 702.857 MB INFO: distributedingressbase.hpp(finalize:304): Graph Finalize: finalizing local graph. INFO: dynamiclocalgraph.hpp(finalize:339): Graph finalized in 0.327999 secs INFO: distributedingressbase.hpp(finalize:307): Local graph info: nverts: 1387607 nedges: 2270081 INFO: memoryinfo.cpp(logusage:90): Memory Info: Finished finalizing local graph. Heap: 1042.34 MB Allocated: 780.916 MB INFO: memoryinfo.cpp(logusage:90): Memory Info: Finished adding vertex data Heap: 1266.35 MB Allocated: 734.377 MB INFO: memoryinfo.cpp(logusage:90): Memory Info: Finihsed allocating lvid2record Heap: 1400.48 MB Allocated: 868.496 MB INFO: memoryinfo.cpp(logusage:90): Memory Info: Finished synchronizing vertex (meta)data Heap: 1601.69 MB Allocated: 1164.17 MB INFO: distributedingressbase.hpp(exchangeglobalinfo:521): Graph Finalize: exchange global statistics INFO: distributedingressbase.hpp(exchangeglobalinfo:546): Graph info: nverts: 2930166 nedges: 2270081 nreplicas: 2930166 replication factor: 1 INFO: omniengine.hpp(omniengine:191): Using the Synchronous engine. INFO: synchronousengine.hpp(synchronousengine:1024): Engine Option: max_iterations = 1Htmlx�I�M! ��7# ++����FYI: If you are using Anaconda and having problems with NumPyHello everyone,

I ran into an issue a few days ago and found out something that may be affecting many GraphLab users who use it with Anaconda on Windows. NumPy was unable to load, and consequently everything that requires it (Matplotlib etc).

It turns out that the current NumPy build (1.10.4) for Windows is problematic (more info here).

Possible workarounds are downgrading to build 1.10.1 or forcing an upgrade to 1.11.0 if your dependencies allow. Downgrading was easy for me using conda install numpy=1.10.1

Thanks for your attention!

RafaelMarkdown558,824,8414L���4L���179.110.206.156179.110.206.1564P�}��Xj�8\j�1str�"��\j�Xj��\j�8bj�րi�1(׀i��g��b�j����Xj�\j�Xj�8\j�1.hpp(decrementdistributedcounter:787): Distributed Aggregation of likelihood. 0 remaining. INFO: distributedaggregator.hpp(decrementdistributedcounter:793): Aggregate completion of likelihood Likelihood: -3.22336e+08 INFO: distributedaggregator.3HLABDISABLELAMBDA_SHM"] = "1" os.environ["GRAPHLABFORCEIPCTOTCP_FALLBACK"] = "1" import graphlab as gl

3. Test out your lambda worker code in this environment. If it works, then you can make the above configuration permanent by running:

gl.sys_util.write_config_file_value("GRAPHLAB_DISABLE_LAMBDA_SHM", "1")
gl.sys_util.write_config_file_value("GRAPHLAB_FORCE_IPC_TO_TCP_FALLBACK", "1")

Note that this can be undone by setting these to "0" instead of "1", or by editing the file given by gl.sys_util.get_config_file().

4. If the lambda workers do not work after trying step 1, then there are two things we would very much appreciate you do to help us track down the issue.

4.1. First, execute the following code in a clean python shell, where you have not yet imported graphlab create. At the end of this code, it prints out the path to a zip file that, if you could send it to us, will help us diagnose the issue. Please create a support tick^j�8bj�2�"��bj�^j��bj�8�j�րi�2(׀i����^j�8bj�2

Comments

User 6 | 1/12/2015, 6:40:24 PM

Hi, It may be that the tolerance which is default 0.01 was too high. Try to set the tolerance to a smaller number of example --tol=1e-10


User 1043 | 1/12/2015, 6:43:09 PM

Thanks for your comments, let me have a try. I am not familiar with this parameter, can you explain a little bit what does tolerance do? Or maybe you can point to me a wiki page for LBP, so I can read more about it.

thanks!


User 1043 | 1/12/2015, 6:45:28 PM

I got the same results :(, Still only 1 iteration.


User 6 | 1/12/2015, 6:45:32 PM

Take a look <a href="https://github.com/janlugt/GraphLab/blob/master/toolkits/graphicalmodels/lbpstructured_prediction.cpp#L375">here</a>. Basically if the residual (the change in values between the previous iteration and this iteration) is not big the node converges and will not run the next iteration.


User 6 | 1/13/2015, 4:37:32 PM

Hi I looked again at your graph, and it is not a graph, but a set of disjoint edges. BP converges for this case in 1 iteration. On a tree, BP converges at most the tree diameter of the tree. I recommend taking <a href="https://class.coursera.org/pgm/lecture">Coursera pgm course</a> to understand what you are doing.. :-)