easy-graph / Easy-Graph

EasyGraph is an open-source network analysis library designed to cover advanced network processing methods. It includes functionalities for detecting structural hole spanners, network embedding, and various classic network analysis techniques.
https://easy-graph.github.io/
BSD 3-Clause "New" or "Revised" License
400 stars 39 forks source link

Slow performance on Structural Holes #95

Closed aritan7 closed 1 year ago

aritan7 commented 2 years ago

Version

0.2a39, Installed through pypi and Linux Script in repo. Tested using Ubuntu 20.04 TLS

Issue

For HITS AND MAX-D structural holes, it took forever to return results of a large graph with 80K relationships. Is there any way to speed up the performance? This is because only single core is used as processing at a time.

Source data: https://github.com/aritan7/pgraph/raw/main/node10k.csv

import easygraph as eg
from easygraph.functions.community.modularity_max_detection import *
G = eg.Graph()
G.add_edges_from_file(file='node10k.csv')
c = eg.greedy_modularity_communities(G)
maxd = eg.get_structural_holes_MaxD(G,k=50, C=c)

Update:

  1. Using get_structural_holes_HIS() would cause a memory leak.
github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

tddschn commented 2 years ago

Sorry for the slow response. The current version on PyPI is very outdated, we'll push the latest version as soon as we figure out how to integrate the C++ binding framework we use with our CI pipeline.

In the meantime, here's a work around you can try to install the latest version of easygraph on your machine:

git clone https://github.com/easy-graph/Easy-Graph && cd Easy-Graph && git checkout pybind11
pip install pybind11
python3 setup.py install
ayaanhossain commented 2 years ago

Even if there is some issue on the CI side of things, you can still push the latest version on PyPI. From the workaround illustrated, one just needs to make pybind11 a part of setup_requires (not install_requires), and everything should be good to go?

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 1 year ago

This issue was closed because it has been stalled for 5 days with no activity.