From 5ca8562f431abaec26fedf3ca07b1cb9e1b8510b Mon Sep 17 00:00:00 2001 From: Umberto Lupo Date: Wed, 4 Aug 2021 00:48:51 +0200 Subject: [PATCH 1/8] Add scaling figure and section explaining scaling in README --- README.rst | 11 +- docs/images/multithreading_speedup.svg | 1753 ++++++++++++++++++++++++ 2 files changed, 1763 insertions(+), 1 deletion(-) create mode 100644 docs/images/multithreading_speedup.svg diff --git a/README.rst b/README.rst index 26686114..075c164a 100644 --- a/README.rst +++ b/README.rst @@ -39,6 +39,16 @@ License ``giotto-ph`` is distributed under the AGPLv3 `license `_. If you need a different distribution license, please contact the `L2F team`_. +Parallel persistent homology backend +==================================== + +Computing persistence barcodes of large datasets and in high homology degrees is challenging even on modern hardware. ``giotto-ph``'s persistent homology backend +is able to distribute the key stages of the computation (namely, search for apparent pairs and coboundary matrix reduction) across an arbitrary number of available CPU threads. +The scaling is generally quite favourable as shown in the following figure (for more details, see our paper linked below): + +.. image:: https://raw.githubusercontent.com/giotto-ai/giotto-ph/readme_speedup_figure/docs/images/multithreading_speedup.svg + :width: 500 + Basic usage in Python ===================== @@ -111,7 +121,6 @@ Use the ``weights`` and ``weight_params`` parameters to constructed a weighted R dgm_dtm = ripser_parallel(pc, weights="DTM", n_threads=-1) - Documentation and Tutorials =========================== diff --git a/docs/images/multithreading_speedup.svg b/docs/images/multithreading_speedup.svg new file mode 100644 index 00000000..6a1b4092 --- /dev/null +++ b/docs/images/multithreading_speedup.svg @@ -0,0 +1,1753 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From df500951534706f5864fe7fbf0f2e9eb0bb45ab0 Mon Sep 17 00:00:00 2001 From: Umberto Lupo <46537483+ulupo@users.noreply.github.com> Date: Wed, 4 Aug 2021 08:08:44 +0200 Subject: [PATCH 2/8] Try centering speedup image --- README.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.rst b/README.rst index 075c164a..3486e2f4 100644 --- a/README.rst +++ b/README.rst @@ -24,6 +24,7 @@ for weighted VR filtrations. See also `Morozov's Ripser fork `_ family of open-source projects and designed for tight integration with the `giotto-tda `_ and `pyflagser `_ libraries. + Project genesis =============== @@ -31,6 +32,7 @@ Project genesis the `Laboratory for Topology and Neuroscience `_ at EPFL, and the `Institute of Reconfigurable & Embedded Digital Systems (REDS) `_ of HEIG-VD. + License ======= @@ -39,6 +41,7 @@ License ``giotto-ph`` is distributed under the AGPLv3 `license `_. If you need a different distribution license, please contact the `L2F team`_. + Parallel persistent homology backend ==================================== @@ -48,6 +51,8 @@ The scaling is generally quite favourable as shown in the following figure (for .. image:: https://raw.githubusercontent.com/giotto-ai/giotto-ph/readme_speedup_figure/docs/images/multithreading_speedup.svg :width: 500 + :align: center + Basic usage in Python ===================== @@ -128,6 +133,7 @@ Documentation and Tutorials Jupyter notebook tutorials can be found in the `examples folder `_. The API reference can be found at https://giotto-ai.github.io/giotto-ph. + Installation ============ @@ -159,6 +165,7 @@ for detailed instructions on how to build ``giotto-ph`` from sources across diff .. _contributing-section: + Contributing ============ @@ -174,6 +181,7 @@ source directory :: pytest gph + Important links =============== From 9357f0b68250b850763db2a282fd1d73ea547e5e Mon Sep 17 00:00:00 2001 From: Umberto Lupo <46537483+ulupo@users.noreply.github.com> Date: Wed, 4 Aug 2021 08:38:58 +0200 Subject: [PATCH 3/8] Try centering with raw html --- README.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 3486e2f4..d269188e 100644 --- a/README.rst +++ b/README.rst @@ -47,11 +47,11 @@ Parallel persistent homology backend Computing persistence barcodes of large datasets and in high homology degrees is challenging even on modern hardware. ``giotto-ph``'s persistent homology backend is able to distribute the key stages of the computation (namely, search for apparent pairs and coboundary matrix reduction) across an arbitrary number of available CPU threads. -The scaling is generally quite favourable as shown in the following figure (for more details, see our paper linked below): +On challenging dataset, the scaling is quite favourable as shown in the following figure (for more details, see our paper linked below): -.. image:: https://raw.githubusercontent.com/giotto-ai/giotto-ph/readme_speedup_figure/docs/images/multithreading_speedup.svg - :width: 500 - :align: center +.. raw:: html + + Scaling of giotto-ph's multithreaded backend Basic usage in Python From 66d371721e63163bc76597bd806c09c484c3353f Mon Sep 17 00:00:00 2001 From: Umberto Lupo <46537483+ulupo@users.noreply.github.com> Date: Wed, 4 Aug 2021 08:40:05 +0200 Subject: [PATCH 4/8] Fix typo and try relative paths --- README.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index d269188e..434b5930 100644 --- a/README.rst +++ b/README.rst @@ -47,11 +47,12 @@ Parallel persistent homology backend Computing persistence barcodes of large datasets and in high homology degrees is challenging even on modern hardware. ``giotto-ph``'s persistent homology backend is able to distribute the key stages of the computation (namely, search for apparent pairs and coboundary matrix reduction) across an arbitrary number of available CPU threads. -On challenging dataset, the scaling is quite favourable as shown in the following figure (for more details, see our paper linked below): + +On challenging datasets, the scaling is quite favourable as shown in the following figure (for more details, see our paper linked below): .. raw:: html - Scaling of giotto-ph's multithreaded backend + Scaling of giotto-ph's multithreaded backend Basic usage in Python From 6775986294d136bf8b4fefaa7b85ff501c2819c7 Mon Sep 17 00:00:00 2001 From: Umberto Lupo <46537483+ulupo@users.noreply.github.com> Date: Wed, 4 Aug 2021 08:46:19 +0200 Subject: [PATCH 5/8] Try one last raw html approach --- README.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 434b5930..f40d5164 100644 --- a/README.rst +++ b/README.rst @@ -51,8 +51,9 @@ is able to distribute the key stages of the computation (namely, search for appa On challenging datasets, the scaling is quite favourable as shown in the following figure (for more details, see our paper linked below): .. raw:: html - - Scaling of giotto-ph's multithreaded backend +

+ Scaling of giotto-ph's multithreaded backend +

Basic usage in Python From fb2fa4cb1e7965b0e484b24a02ed499a4409da67 Mon Sep 17 00:00:00 2001 From: Umberto Lupo <46537483+ulupo@users.noreply.github.com> Date: Wed, 4 Aug 2021 08:48:16 +0200 Subject: [PATCH 6/8] Revert to standard RST directives --- README.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index f40d5164..8ad52d31 100644 --- a/README.rst +++ b/README.rst @@ -50,10 +50,10 @@ is able to distribute the key stages of the computation (namely, search for appa On challenging datasets, the scaling is quite favourable as shown in the following figure (for more details, see our paper linked below): -.. raw:: html -

- Scaling of giotto-ph's multithreaded backend -

+.. image:: docs/images/multithreading_speedup.svg + :width: 500px + :align: center + :alt: "Scaling of giotto-ph's multithreaded backend" Basic usage in Python From 71017b3e1a33a5982d1c0c5d381563c4fa1c2357 Mon Sep 17 00:00:00 2001 From: Umberto Lupo <46537483+ulupo@users.noreply.github.com> Date: Wed, 4 Aug 2021 08:49:19 +0200 Subject: [PATCH 7/8] Remove alt text --- README.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/README.rst b/README.rst index 8ad52d31..945226a8 100644 --- a/README.rst +++ b/README.rst @@ -53,7 +53,6 @@ On challenging datasets, the scaling is quite favourable as shown in the followi .. image:: docs/images/multithreading_speedup.svg :width: 500px :align: center - :alt: "Scaling of giotto-ph's multithreaded backend" Basic usage in Python From 859a522c8738c7afc7228073c55ad0f4ac65d5e6 Mon Sep 17 00:00:00 2001 From: Umberto Lupo <46537483+ulupo@users.noreply.github.com> Date: Wed, 4 Aug 2021 08:56:47 +0200 Subject: [PATCH 8/8] Place global URL instead of relative path --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 945226a8..b8518663 100644 --- a/README.rst +++ b/README.rst @@ -50,7 +50,7 @@ is able to distribute the key stages of the computation (namely, search for appa On challenging datasets, the scaling is quite favourable as shown in the following figure (for more details, see our paper linked below): -.. image:: docs/images/multithreading_speedup.svg +.. image:: https://raw.githubusercontent.com/giotto-ai/giotto-ph/main/docs/images/multithreading_speedup.svg :width: 500px :align: center