Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tommoral/dicodile
Experiments for "Distributed Convolutional Dictionary Learning (DiCoDiLe): Pattern Discovery in Large Images and Signals"
https://github.com/tommoral/dicodile
convolutional-dictionary-learning distributed-computing pattern-discovery signals
Last synced: 14 days ago
JSON representation
Experiments for "Distributed Convolutional Dictionary Learning (DiCoDiLe): Pattern Discovery in Large Images and Signals"
- Host: GitHub
- URL: https://github.com/tommoral/dicodile
- Owner: tomMoral
- License: bsd-3-clause
- Created: 2019-01-26T15:26:24.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2024-10-21T09:39:22.000Z (26 days ago)
- Last Synced: 2024-10-23T21:57:48.175Z (23 days ago)
- Topics: convolutional-dictionary-learning, distributed-computing, pattern-discovery, signals
- Language: Python
- Homepage: https://tommoral.github.io/dicodile/
- Size: 32.7 MB
- Stars: 18
- Watchers: 5
- Forks: 10
- Open Issues: 13
-
Metadata Files:
- Readme: README.rst
- Contributing: CONTRIBUTING.rst
- License: LICENSE
Awesome Lists containing this project
README
|Build Status| |codecov|
This package is still under development. If you have any trouble running this code,
please `open an issue on GitHub `_.DiCoDiLe
--------Package to run the experiments for the preprint paper `Distributed Convolutional Dictionary Learning (DiCoDiLe): Pattern Discovery in Large Images and Signals `__.
Installation
^^^^^^^^^^^^All the tests should work with python >=3.6. This package depends on the python
library ``numpy``, ``matplotlib``, ``scipy``, ``mpi4py``, ``joblib``. The
package can be installed with the following command run from the root of the
package... code:: bash
pip install -e .
Or using the conda environment:
.. code:: bash
conda env create -f dicodile_env.yml
To build the doc use:
.. code:: bash
pip install -e .[doc]
cd docs
make htmlTo run the tests:
.. code:: bash
pip install -e .[test]
pytest .Usage
^^^^^All experiments are with ``mpi4py`` and will try to spawned workers depending on the parameters set in the experiments. If you need to use an ``hostfile`` to configure indicate to MPI where to spawn the new workers, you can set the environment variable ``MPI_HOSTFILE=/path/to/the/hostfile`` and it will be automatically detected in all the experiments. Note that for each experiments you should provide enough workers to allow the script to run.
All figures can be generated using scripts in ``benchmarks``. Each script will generate and save the data to reproduce the figure. The figure can then be plotted by re-running the same script with the argument ``--plot``. The figures are saved in pdf in the ``benchmarks_results`` folder. The computation are cached with ``joblib`` to be robust to failures.
.. note::
Open MPI tries to use all **up** network interfaces. This might cause the program to hang due to virtual network interfaces which could not actually be used to communicate with MPI processes. For more info `Open MPI FAQ `_.
In case your program hangs, you can launch computation with the ``mpirun`` command:
- either spefifying usable interfaces using ``--mca btl_tcp_if_include`` parameter:
.. code-block:: bash
$ mpirun -np 1 \
--mca btl_tcp_if_include wlp2s0 \
--hostfile hostfile \
python -m mpi4py examples/plot_mandrill.py- or by excluding the virtual interfaces using ``--mca btl_tcp_if_exclude`` parameter:
.. code-block:: bash
$ mpirun -np 1 \
--mca btl_tcp_if_exclude docker0 \
--hostfile hostfile \
python -m mpi4py examples/plot_mandrill.pyAlternatively, you can also restrict the used interface by setting environment variables ``OMPI_MCA_btl_tcp_if_include`` or ``OMPI_MCA_btl_tcp_if_exclude``
.. code-block:: bash
$ export OMPI_MCA_btl_tcp_if_include="wlp2s0"
$ export OMPI_MCA_btl_tcp_if_exclude="docker0"``
.. |Build Status| image:: https://github.com/tomMoral/dicodile/workflows/unittests/badge.svg
.. |codecov| image:: https://codecov.io/gh/tomMoral/dicodile/branch/main/graph/badge.svg
:target: https://codecov.io/gh/tomMoral/dicodile