Modular pipeline for testing and using an improved version of CM for generating well-connected clusters.
JSON Pipeline
- Introduction of a much cleaner JSON pipeline to run generalized clustering procedures.
Algorithmic fixes of CM
- Correct handling of disconnected clusters (0-connectivity)
- Fixed definition of
extantparameterextant: CM-valid clusters that were untouched by CMcm_valid: Whatextantwas originally — a cluster that does not need to be operated on by CM anymore
Functional changes in CM
- Removed
--labelonlyparameter. CM2Universal is essential so there shouldn't be a parameter that silences it. Rather, we introduce a new parameter:-for--firsttsv: Include the original tsv, pre-CM2Universal. This tsv defaults to not being outputted when the tag is omitted- JSON2Membership is now integrated with CM++ and the default tsv being outputted comes from the
after.jsonthat results from CM2Universal.
Parallelism introduced in this version.
Commands from v2.0 stay consistent, except now you can add the following options
-n <number of parallel processes>or--nprocs <number of parallel processes>: Specify number of processes to create to run CM++ in parallel. Default 4-lor--labelonly: Don't output a tree and don't run CM2Universal. Default without this tag, CM will automatically output a tree and run CM2Universal
- Enabled the option to run the clustering for multiple n values
- Removed the support for runleiden
- Integrated the leidenalg wrapper
- Users can choose between runleiden and leidenalg with number_of_iterations
- If
clustering_scriptis not specified in. theparam.configthen by defaultleidenalgis used with defaultnumber_of_iterationsequals to 2. - CM
- Added Python wrapper for VieCut to avoid overhead in fork-exec-wait paradigm
- Replaced MincutResult object with python-mincut C++ object
- Shortened mincut computation in CM
- Introduction of modular pipeline
- Post cm filtering to remove clusters of size 10
- Set the filtering of clusters size to
N>1in analysis scripts - Introduced
--quietor-qparam
- Refer to this link
- The input to the pipeline script is a pipeline.json file. NOTE that you can use any other json file as input as long as it fit
- Description of the supported key-value pairs in the config file can be found here pipeline_template.json
- Edit the fields of the
pipeline.jsonfile to reflect your inputs and requirements. - Run
python -m main pipeline.json
- Please refer to the documentation on how to write the
pipeline.jsonfile.
- Create a python venv with 3.9 or above version. We are using python3.9
- Activate the venv and run "pip install -r requirements.txt"
cmakeversion3.2.0and above should be installed.python39-develor higher should be installed, e.g., dnf install python39-developenmpiandgccof any version- In our analysis,
openmpi 4.2.0andgcc 9.2.0were used. The code works with gcc 8.5 too in an Oracle Linux 8 environment.
- In our analysis,
- These instructions are specific for users on an EngrIT cluster (such as Valhalla or the Campus Cluster) under the University of Illinois at Urbana-Champaign
- You can get all the needed packages to run the pipeline via the following commands
module load python3/3.10.0
module load cmake/3.25.1
module load gcc/9.2.0
module load openmpi/4.0.1NOTE: These need to be loaded not just on installation but on execution of the CM pipeline
- Clone the cm_pipeline repository
- Activate the venv which has the necessary packages
- Simply run
./setup.sh - Alternatively
- Set up
python-mincut:- Initiate the submodules via the following commands being run from the root of this (cm_pipeline) repository
git submodule update --init --recursive cd hm01/tools/python-mincut mkdir build cd build cmake .. && make cd ../../../..
- Set up
cluster-statisticsand thepython-mincutwithin thecluster-statisticssubmodule:- Run the following commands
cd cluster-statistics/tools/python-mincut mkdir build cd build cmake .. && make cd ../..
- Set up
- Edit the fields of the
pipeline.jsonfile to reflect your inputs and requirements. Please refer to the documentation on how to write thepipeline.jsonfile. - Run
python -m main pipeline.json
Simply run the following
git clone -b v<version #> https://github.com/illinois-or-research-analytics/cm_pipeline.git .
- The commands executed during the workflow are captured in
{output_dir}/{run_name}-{timestamp}/commands.sh. This is the shell script generated by the pipeline that is run to generate outputs. - The output files generated during the workflow are stored in the folder
{output_dir}/{run_name}-{timestamp}/ - The descriptive analysis files can be found in the folder
{output_dir}/{run_name}-{timestamp}/analysiswith the*.csvfile for each of the resolution values.
@misc{cm_pipe2023,
author = {Vidya Kamath and Vikram Ramavarapu and Fabio Ayres, and George Chacko},
title = {Connectivity Modifier Pipeline},
howpublished = {\url{https://github.com/illinois-or-research-analytics/cm_pipeline}},
year={2023},
}
- Support to run the workflow with individual stages (as opposed to "end to end")
- Add fraction of clusters untouched by the central CM module of pipeline in the analysis file.
- Mechanism to sync the scripts used within cm_pipeline with the latest changes.
- Add more log messages in the source code for different levels (Currently INFO, DEBUG, ERROR log messages are added).
