|
|
# EM-Bright genetic programming training
|
|
|
## Step-wise installation of packages:
|
|
|
1. Clone the repository in a desired directory.`git clone git@git.ligo.org:sushant.sharma-chaudhary/em-bright-gp.git `
|
|
|
|
|
|
2. Create a anaconda environment using: `conda create -n {name} python=3.{8/9}`
|
|
|
|
|
|
3. Activate the environment : `conda activate {name}`
|
|
|
|
|
|
4. Install poetry using : `pip install poetry`
|
|
|
|
|
|
5. Go to the em-bright cloned directory and install the package using : `poetry install`
|
|
|
|
|
|
6. In order to train for genetic programming, additional packages must be installed.
|
|
|
- tensorflow : `conda install tensorflow`
|
|
|
- htcondor : `pip install htcondor`
|
|
|
- pytorch : `conda install pytorch`
|
|
|
- gpytorch : `conda install gpytorch`
|
|
|
- Karoo-GP : `pip install karoo-gp`
|
|
|
|
|
|
## Training classifier
|
|
|
1. Creating condor jobs for training:
|
|
|
```
|
|
|
em_bright_dag_writer
|
|
|
-d {filename}.dag \
|
|
|
-w {output_dir} \
|
|
|
-i /home/deep.chatterjee/O2-HL-rates-injections \
|
|
|
-c {CLONED_PROJECT_DIRECTORY}/etc/conf.ini \
|
|
|
-e $(dirname `which em_bright_dag_writer`) \
|
|
|
-m gp
|
|
|
```
|
|
|
2. Change configurations for training in `etc/conf.ini`
|
|
|
4. Change directory to `{output_dir}`
|
|
|
3. Submit condor jobs :
|
|
|
` condor_submit_dag -maxjobs 50 {filename}.dag`
|
|
|
Note that these jobs require GPU and to prevent hogging resource we cap the jobs.
|
|
|
|
|
|
## Output files
|
|
|
1. The winner trees output are stored at `{output_dir}/gp_output` according to respective EoS
|
|
|
2. The final probability files are named `'Probability_NS_merged.csv','Probability_EMB_merged.csv'` under `{output_dir}` |