From 5040b7ae3414495e810ab91396e2ffc7400c91fe Mon Sep 17 00:00:00 2001 From: yo123abxd Date: Wed, 5 Jun 2024 12:25:34 +0000 Subject: [PATCH 1/3] update README.md about GPU-related Installation --- README.md | 62 +++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 40 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 12f2beba..88505ec8 100644 --- a/README.md +++ b/README.md @@ -25,12 +25,10 @@ ___________________________________________________________________________ - **PyPI Homepage:** https://pypi.org/project/Python-EasyGraph/ - **Youtube channel:** https://www.youtube.com/@python-easygraph -Introduction ------------- +# Introduction **EasyGraph** is an open-source network analysis library. It is mainly written in Python and supports analysis for undirected networks and directed networks. EasyGraph supports various formats of network data and covers a series of important network analysis algorithms for community detection, structural hole spanner detection, network embedding, and motif detection. Moreover, EasyGraph implements some key elements using C++ and introduces multiprocessing optimization to achieve better efficiency. -New Features in Version 1.1 --------------------------- +# New Features in Version 1.1 - **Support for more hypergraph metrics and algorithms.** Such as [hypercoreness](https://www.nature.com/articles/s41467-023-41887-2), [vector-centrality](https://www.sciencedirect.com/science/article/pii/S0960077922006075), [s-centrality](https://epjds.epj.org/articles/epjdata/abs/2020/01/13688_2020_Article_231/13688_2020_Article_231.html), and so on. - **Support for more hypergraph datasets.** Static hypergraph datasets and dynamic datasets can be both loaded by calling corresponding dataset name. - **Support for more flexible dynamic hypergraph visualization.** Users can define dynamic hypergraphs and visualize the structure of the hypergraph at each timestamp. @@ -39,30 +37,27 @@ New Features in Version 1.1 If you need more details, please see our [documentation](https://easy-graph.github.io/) of the latest version. -News ----- +# News - [04-09-2024] We released EasyGraph 1.2! This version now fully supports Python 3.12. - [03-06-2024] We received the Shanghai Open Source Innovation Outstanding Achievement Award (Grand Prize)! [News](https://news.fudan.edu.cn/2024/0401/c2463a139799/page.htm) - [02-05-2024] We released EasyGraph 1.1! This version features hypergraph analysis and learning for higher-order network modeling and representation. - [08-17-2023] We released EasyGraph 1.0! - [08-08-2023] Our paper "EasyGraph: A Multifunctional, Cross-Platform, and Effective Library for Interdisciplinary Network Analysis" was accepted by Patterns (Cell Press)! -Stargazers ----------- +# Stargazers [![Stars][star-image]][star-url] [star-image]:https://reporoster.com/stars/easy-graph/Easy-Graph [star-url]: https://github.com/easy-graph/Easy-Graph/stargazers -Install -------- +# Install -- **Prerequisites** +## Supported Versions ``3.8 <= Python <= 3.12`` is required. -- **Installation with** ``pip`` +## Installation With pip ``` $ pip install --upgrade Python-EasyGraph ``` @@ -70,21 +65,45 @@ The conda package is no longer updated or maintained. If you've installed EasyGraph this way before, please uninstall it with ``conda`` and install it with ``pip``. -If prebuilt EasyGraph wheels are not supported for your platform (OS / CPU arch, check [here](https://pypi.org/simple/python-easygraph/)), you can build it locally this way: +## Build From Source +If prebuilt EasyGraph wheels are not supported for your platform (OS / CPU arch, check [here](https://pypi.org/simple/python-easygraph/)), or you want to have GPU-based functions enabled, you can build it locally. + +### Prerequisites +- CMake >= 3.23 +- A compiler that fully supports C++11 +- CUDA Toolkit 11.8 or later would be preferred (If need GPUs enabled) + +### Installation +#### On Linux +``` + git clone --recursive https://github.com/easy-graph/Easy-Graph + export EASYGRAPH_ENABLE_GPU="TRUE" # for users who want to enable GPUs + pip install ./Easy-Graph +``` + +#### On Windows ``` - git clone https://github.com/easy-graph/Easy-Graph && cd Easy-Graph && git checkout pybind11 - pip install pybind11 - python3 setup.py build_ext - python3 setup.py install + % For Windows users who want to enable GPU-based functions, % + % you must execute the commands below in cmd but not PowerShell. % + git clone --recursive https://github.com/easy-graph/Easy-Graph + set EASYGRAPH_ENABLE_GPU=TRUE % for users who want to enable GPUs % + pip install ./Easy-Graph ``` -- **Hint** + +#### On macOS +``` + # Since macOS doesn't support CUDA, we can't have GPUs enabled on macOS + git clone --recursive https://github.com/easy-graph/Easy-Graph + pip install ./Easy-Graph +``` + +## Hint EasyGraph uses 1.12.1 <= [PyTorch](https://pytorch.org/get-started/locally/) < 2.0 for machine learning functions. Note that this does not prevent your from running non-machine learning functions normally, if there is no PyTorch in your environment. But you will receive some warnings which remind you some unavailable modules when they depend on it. -Simple Example --------------- +# Simple Example This example shows the general usage of methods in EasyGraph. ```python @@ -111,8 +130,7 @@ using the [HIS](https://keg.cs.tsinghua.edu.cn/jietang/publications/WWW13-Lou&Ta 6: {0: 0.83595703125} } ``` -Citation --------- +# Citation If you use EasyGraph in a scientific publication, we would appreciate citations to the following paper: ``` From 07af1d8121f3c319a399f62dbdcdae67b78c873b Mon Sep 17 00:00:00 2001 From: yo123abxd Date: Wed, 5 Jun 2024 12:27:34 +0000 Subject: [PATCH 2/3] update README.md about GPU-related Installation --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 88505ec8..e0f954d0 100644 --- a/README.md +++ b/README.md @@ -99,9 +99,9 @@ If prebuilt EasyGraph wheels are not supported for your platform (OS / CPU arch, ## Hint - EasyGraph uses 1.12.1 <= [PyTorch](https://pytorch.org/get-started/locally/) < 2.0 for machine learning functions. - Note that this does not prevent your from running non-machine learning functions normally, if there is no PyTorch in your environment. - But you will receive some warnings which remind you some unavailable modules when they depend on it. +EasyGraph uses 1.12.1 <= [PyTorch](https://pytorch.org/get-started/locally/) < 2.0 for machine learning functions. +Note that this does not prevent your from running non-machine learning functions normally, if there is no PyTorch in your environment. +But you will receive some warnings which remind you some unavailable modules when they depend on it. # Simple Example From 9340762b2be0a85fd0c51e1fb4439f4c151efd7f Mon Sep 17 00:00:00 2001 From: yo123abxd Date: Fri, 7 Jun 2024 02:15:46 +0000 Subject: [PATCH 3/3] Fixing typo of README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e0f954d0..58db07aa 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ ___________________________________________________________________________ # New Features in Version 1.1 - **Support for more hypergraph metrics and algorithms.** Such as [hypercoreness](https://www.nature.com/articles/s41467-023-41887-2), [vector-centrality](https://www.sciencedirect.com/science/article/pii/S0960077922006075), [s-centrality](https://epjds.epj.org/articles/epjdata/abs/2020/01/13688_2020_Article_231/13688_2020_Article_231.html), and so on. -- **Support for more hypergraph datasets.** Static hypergraph datasets and dynamic datasets can be both loaded by calling corresponding dataset name. +- **Support for more hypergraph datasets.** Static hypergraph datasets and dynamic datasets can be both loaded by calling the corresponding dataset name. - **Support for more flexible dynamic hypergraph visualization.** Users can define dynamic hypergraphs and visualize the structure of the hypergraph at each timestamp. - **Support for more efficient hypergraph computation and hypergraph learning.** Adoption of suitable storage structure and caching strategy for different metrics/hypergraph neural networks.