mirror of
https://github.com/Doctorado-ML/Stree_datasets.git
synced 2025-08-15 15:36:01 +00:00
Add server jobs control scripts
This commit is contained in:
3
scripts/.gitignore
vendored
Normal file
3
scripts/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
gridsearch/*
|
||||
gridbest/*
|
||||
cross/*
|
16
scripts/experiment.template
Normal file
16
scripts/experiment.template
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
### Nombre de trabajo
|
||||
#PBS -N <experiment>-<data>-<model>-<kernel>
|
||||
### Tiempo máximo de ejecución del trabajo
|
||||
#PBS -l walltime=96:00:00
|
||||
### Seleccion de cola de trabajos
|
||||
#PBS -q workq
|
||||
### mezcla errores con la salida principal
|
||||
#PBS -j oe
|
||||
### Recursos
|
||||
#PBS -l select=2:ncpus=2:mem=16Gb
|
||||
### Esportar variables de entorno
|
||||
#PBS -V
|
||||
### Ejecutable con sus parametros
|
||||
cd <folder>
|
||||
python experiment.py -H galgo -e <experiment> -m <model> -d <data> -S tanveer -k <kernel> -n 1
|
9
scripts/genall.sh
Executable file
9
scripts/genall.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
for i in gridsearch gridbest cross; do
|
||||
echo "*** Building $i experiments"
|
||||
for j in stree odte bagging adaBoost; do
|
||||
for k in linear poly rbf; do
|
||||
./genjobs.sh $i $j $k
|
||||
done
|
||||
done
|
||||
done
|
32
scripts/genjobs.sh
Executable file
32
scripts/genjobs.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
if [ "$1" = "" -o "$2" = "" -o "$3" = "" ] ; then
|
||||
echo "Hay que seleccionar:"
|
||||
echo " - el tipo de experimento {gridsearch, gridbest, cross}"
|
||||
echo " - el modelo {stree, adaBoost, bagging, odte}"
|
||||
echo " - el kernel {linear, poly, rbf, any}"
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! "gridsearchgridbestcross" == *$1* ]] ; then
|
||||
echo "Hay que seleccionar el tipo de experimento {gridsearch, gridbest, cross}"
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! "streeadaBoostbaggingodte" == *$2* ]] ; then
|
||||
echo "Hay que seleccionar el modelo {stree, adaBoost, bagging, odte}"
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! "linearpolyrbfany" == *$3* ]] ; then
|
||||
echo "Hay que seleccionar el kernel {linear, poly, rbf, any}"
|
||||
exit 1
|
||||
fi
|
||||
script_path="$(pwd)/.."
|
||||
cp experiment.template experiment_$1.sh
|
||||
perl -i -pe"s/<model>/$2/g" experiment_$1.sh
|
||||
perl -i -pe"s~<folder>~$script_path~g" experiment_$1.sh
|
||||
perl -i -pe"s/<experiment>/$1/g" experiment_$1.sh
|
||||
mkdir -p $1/$2/$3
|
||||
cat ../datasets.txt|cut -d " " -f 2|tail -49|while read a; do
|
||||
cp experiment_$1.sh $1/$2/$3/experiment_$a.sh
|
||||
perl -i -pe"s/<data>/$a/g" $1/$2/$3/experiment_$a.sh
|
||||
perl -i -pe"s/<kernel>/$3/g" $1/$2/$3/experiment_$a.sh
|
||||
done
|
||||
rm experiment_$1.sh
|
2
scripts/interactive.sh
Executable file
2
scripts/interactive.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
qsub -I -l select=2:ncpus=8:mem=16Gb
|
40
scripts/launchsome.sh
Executable file
40
scripts/launchsome.sh
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
if [ "$1" = "" -o "$2" = "" -o "$3" = "" -o "$4" = "" ] ; then
|
||||
echo "Hay que seleccionar:"
|
||||
echo " - el tipo de experimento {gridsearch, gridbest, cross}"
|
||||
echo " - el modelo {stree, adaBoost, bagging, odte}"
|
||||
echo " - el kernel {linear, poly, rbf, any}"
|
||||
echo " - el archivo con nombres de datasets"
|
||||
echo "opcionalmente al final: dry-run"
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! "gridsearchgridbestcross" == *$1* ]] ; then
|
||||
echo "Hay que seleccionar el tipo de experimento {gridsearch, gridbest, cross}"
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! "streeadaBoostbaggingodte" == *$2* ]] ; then
|
||||
echo "Hay que seleccionar el modelo {stree, adaBoost, bagging, odte}"
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! "linearpolyrbfany" == *$3* ]] ; then
|
||||
echo "Hay que seleccionar el kernel {linear, poly, rbf, any}"
|
||||
exit 1
|
||||
fi
|
||||
script_path="$(pwd)"
|
||||
cd $1/$2/$3
|
||||
counter=0
|
||||
lines="$(cat $script_path/$4|cut -d " " -f 2|tail -49)"
|
||||
for a in $lines; do
|
||||
echo "launch experiment_$a.sh"
|
||||
if [ "$5" = "dry-run" ] ; then
|
||||
echo "not launched"
|
||||
else
|
||||
qsub experiment_$a.sh
|
||||
fi
|
||||
let counter++
|
||||
done
|
||||
if [ "$5" = "dry-run" ] ; then
|
||||
echo "Not launched $counter jobs"
|
||||
else
|
||||
echo "Launched $counter jobs"
|
||||
fi
|
4
scripts/notebook.sh
Executable file
4
scripts/notebook.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
NOTEBOOKPORT=1234
|
||||
ssh -N -f -R $NOTEBOOKPORT:localhost:$NOTEBOOKPORT Ricardo.Montanana@galgo.uclm.es
|
||||
jupyter lab --port=$NOTEBOOKPORT --no-browser
|
4
scripts/rmscripts.sh
Executable file
4
scripts/rmscripts.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
for folder in gridsearch gridbest cross; do
|
||||
find $folder -type f -exec rm {} \;
|
||||
done
|
Reference in New Issue
Block a user