Package: dicodile
This package is still under development. If you have any trouble running this code,
pleaseopen an issue on GitHub.DiCoDiLePackage to run the experiments for the preprint paperDistributed Convolutional Dictionary Learning (DiCoDiLe): Pattern Discovery in Large Images and Signals.InstallationAll the tests should work with python >=3.6. This package depends on the python
librarynumpy,matplotlib,scipy,mpi4py,joblib. The
package can be installed with the following command run from the root of the
package.pipinstall-e.Or using the conda environment:condaenvcreate-fdicodile_env.ymlTo build the doc use:pipinstall-e.[doc]cddocsmakehtmlTo run the tests:pipinstall-e.[test]pytest.UsageAll experiments are withmpi4pyand will try to spawned workers depending on the parameters set in the experiments. If you need to use anhostfileto configure indicate to MPI where to spawn the new workers, you can set the environment variableMPI_HOSTFILE=/path/to/the/hostfileand 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 inbenchmarks. 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 thebenchmarks_resultsfolder. The computation are cached withjoblibto be robust to failures.NoteOpen MPI tries to use allupnetwork 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 infoOpen MPI FAQ.In case your program hangs, you can launch computation with thempiruncommand:either spefifying usable interfaces using--mcabtl_tcp_if_includeparameter:$mpirun-np1\--mcabtl_tcp_if_includewlp2s0\--hostfilehostfile\python-mmpi4pyexamples/plot_mandrill.pyor by excluding the virtual interfaces using--mcabtl_tcp_if_excludeparameter:$mpirun-np1\--mcabtl_tcp_if_excludedocker0\--hostfilehostfile\python-mmpi4pyexamples/plot_mandrill.pyAlternatively, you can also restrict the used interface by setting environment variablesOMPI_MCA_btl_tcp_if_includeorOMPI_MCA_btl_tcp_if_exclude$exportOMPI_MCA_btl_tcp_if_include="wlp2s0"$exportOMPI_MCA_btl_tcp_if_exclude="docker0"``BSD 3-Clause LicenseCopyright (c) 2019-2021, the DiCoDiLe developers.
All rights reserved.Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS”
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.