-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathrun_model.sh
executable file
·56 lines (50 loc) · 1.85 KB
/
run_model.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
export BLIS_NUM_THREADS=1
export MKL_NUM_THREADS=1
export NUMBA_NUM_THREADS=1
export NUMEXPR_NUM_THREADS=1
export OMP_NUM_THREADS=1
export OPENBLAS_NUM_THREADS=1
export VECLIB_MAXIMUM_THREADS=1
export MPLBACKEND=agg
if [ -d "/lscratch/$SLURM_JOB_ID" ]; then
export TMPDIR=/lscratch/$SLURM_JOB_ID
else
mkdir -p ~/tmp
export TMPDIR=~/tmp
fi
export PYTHONUNBUFFERED=1
python_warnings=(
'ignore::FutureWarning:sklearn.utils.deprecation'
'ignore::FutureWarning:rpy2.robjects.pandas2ri'
'ignore:Optimization did not converge:UserWarning'
'ignore:Optimization terminated early:UserWarning'
'ignore:Persisting input arguments took:UserWarning'
'ignore:Estimator fit failed:RuntimeWarning'
'ignore:all coefficients are zero:UserWarning:sksurv_extensions.linear_model._coxnet'
'ignore:divide by zero encountered in true_divide:RuntimeWarning:sksurv.linear_model.coxph'
'ignore:invalid value encountered in true_divide:RuntimeWarning'
'ignore:overflow encountered in exp:RuntimeWarning:sksurv.linear_model.coxph'
'ignore:overflow encountered in power:RuntimeWarning:sksurv.linear_model.coxph'
'ignore:Solver terminated early:UserWarning:sklearn.svm._base'
'ignore:The max_iter was reached which means the coef_ did not converge:UserWarning:sklearn.linear_model._sag'
'ignore:No features were selected:UserWarning:sklearn_extensions.feature_selection._base'
)
OIFS="$IFS"
IFS=','
export PYTHONWARNINGS="${python_warnings[*]}"
IFS="$OIFS"
CONDA_BASE=$(conda info --base)
source $CONDA_BASE/etc/profile.d/conda.sh
while [[ -v CONDA_DEFAULT_ENV ]]; do
conda deactivate
done
conda activate tcga-microbiome-prediction
if [[ -v SLURM_SUBMIT_DIR ]]; then
SCRIPT_DIR="$SLURM_SUBMIT_DIR"
else
SCRIPT_DIR=$(dirname $(realpath -s $0))
fi
RUN_MODEL_CMD="python $SCRIPT_DIR/run_model.py $@"
echo $RUN_MODEL_CMD
$RUN_MODEL_CMD