diff --git a/scripts/experiment.template b/scripts/experiment.pbs similarity index 100% rename from scripts/experiment.template rename to scripts/experiment.pbs diff --git a/scripts/experiment.slurm b/scripts/experiment.slurm new file mode 100644 index 0000000..5951c83 --- /dev/null +++ b/scripts/experiment.slurm @@ -0,0 +1,14 @@ +#!/bin/bash + +#SBATCH --time=96:00:00 # walltime +#SBATCH --ntasks=4 # number of processor cores (i.e. tasks) +#SBATCH --nodes=1 # number of nodes +#SBATCH --mem-per-cpu=4096M # memory per CPU core +#SBATCH -J "---" # job name +#SBATCH --mail-user=ricardo.montanana@alu.uclm.es # email address +#SBATCH --mail-type=END +#SBATCH --mail-type=FAIL + +# LOAD MODULES, INSERT CODE, AND RUN YOUR PROGRAMS HERE +cd +python experiment.py -H galgo -e -m -d -S tanveer -k -n 1 \ No newline at end of file diff --git a/scripts/genall.sh b/scripts/genall.sh index 33db80c..c32b5d3 100755 --- a/scripts/genall.sh +++ b/scripts/genall.sh @@ -1,9 +1,17 @@ #!/bin/bash +if [ "$1" = "" ] ; then + echo "Hay que especificar si es pbs o slurm" + exit 1 +fi +if [[ ! "pbsslurm" == *$1* ]] ; then + echo "Hay que especificar si es pbs o slurm" + exit 1 +fi 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 any; do - ./genjobs.sh $i $j $k + ./genjobs.sh $i $j $k $1 done done done \ No newline at end of file diff --git a/scripts/genjobs.sh b/scripts/genjobs.sh index 25782ea..a77a6c0 100755 --- a/scripts/genjobs.sh +++ b/scripts/genjobs.sh @@ -1,9 +1,10 @@ #!/bin/bash -if [ "$1" = "" -o "$2" = "" -o "$3" = "" ] ; then +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 tipo de plataforma {pbs, slurm}" exit 1 fi if [[ ! "gridsearchgridbestcross" == *$1* ]] ; then @@ -18,8 +19,12 @@ if [[ ! "linearpolyrbfany" == *$3* ]] ; then echo "Hay que seleccionar el kernel {linear, poly, rbf, any}" exit 1 fi +if [[ ! "pbsslurm" == *$4* ]] ; then + echo "Hay que seleccionar la plataforma {pbs, slurm}" + exit 1 +fi script_path="$(pwd)/.." -cp experiment.template experiment_$1.sh +cp experiment.$4 experiment_$1.sh perl -i -pe"s//$2/g" experiment_$1.sh perl -i -pe"s~~$script_path~g" experiment_$1.sh perl -i -pe"s//$1/g" experiment_$1.sh diff --git a/setup.py b/setup.py index f1c09af..a66ebe3 100644 --- a/setup.py +++ b/setup.py @@ -38,6 +38,7 @@ setuptools.setup( "odte", "sshtunnel", "mysql-connector-python", + "pandas", ], zip_safe=False, )