Parcourir la source

Merge tag 'v0.2.5' into develop

- Add of dataset details into README.md file
Jérôme BUISINE il y a 4 ans
Parent
commit
b2d8d8cc96
3 fichiers modifiés avec 88 ajouts et 0 suppressions
  1. 34 0
      oar/README.md
  2. 39 0
      oar/generate_symlinks.sh
  3. 15 0
      oar/oar.example.sh

+ 34 - 0
oar/README.md

@@ -0,0 +1,34 @@
+# Run on Calculco
+
+## Preparation of project
+
+```
+cd ~/projects
+git clone https://%PROJET_NAME%.git %PROJET_NAME%
+```
+
+Push you `dataset` into the /scratch/orvalXX/lisic/user/data
+```
+cp -r %PROJET_NAME% /scratch/orvalXX/lisic/user/%PROJET_NAME%
+```
+
+## Link data
+
+Create symbolic links to `dataset` of project:
+```
+ln -s /scracth/orvalXX/lisic/user/data/%PROJET_NAME% dataset
+```
+
+Create all usefull symbolic links to for project:
+```
+bash modules/oar/generate_symlinks orvalXX lisic/user/projects/%PROJET_NAME%
+```
+
+**Note:** `modules` is the submodule name of this project into your own project.
+
+## Run script
+
+Create your `oar.sh` script based on `oar.example.sh` and run it:
+```
+oarsub -S oar.sh
+```

+ 39 - 0
oar/generate_symlinks.sh

@@ -0,0 +1,39 @@
+#! /bin/bash
+
+if [ -z "$1" ]
+  then
+    echo "No argument supplied"
+    echo "Need to specify orval you want to use (in /scratch folder)"
+    exit 1
+fi
+
+if [ -z "$2" ]
+  then
+    echo "No argument supplied"
+    echo "Need to specify where you want to store data"
+    exit 1
+fi
+
+
+echo "Creating links into /scratch folder"
+
+scratch="scratch"
+orval=$1
+path=$2
+
+
+for link in {"data","results","logs","saved_models","models_info","models_backup","threshold_map","learned_zones","custom_norm"}; do
+    
+    if [ -L ${link} ]; then
+        rm ${link}
+    fi
+    
+    fullpath=${scratch}/${orval}/${path}/${link}
+
+    if [ ! -d "${fullpath}" ]; then
+        mkdir -p ${fullpath}
+    fi
+    
+    # remove `orval` name for running part
+    ln -s ${scratch}/${path}/${link} ${link}
+done

+ 15 - 0
oar/oar.example.sh

@@ -0,0 +1,15 @@
+#!/bin/sh
+
+#OAR --array-param-file params.txt
+#OAR -l /nodes=1,walltime=6:00:00
+#OAR -p host="orval02"
+#OAR -t besteffort
+#OAR --notify mail:jerome.buisine@univ-littoral.fr
+#OAR -O /nfs/home/lisic/jbuisine/projects/launchers/logs/Thesis-NoiseDetection-CNN.%jobid%.out
+#OAR -E /nfs/home/lisic/jbuisine/projects/launchers/logs/Thesis-NoiseDetection-CNN.%jobid%.err
+
+# Activiate venv used by python
+. ~/opt/venvs/thesis-venv/bin/activate
+
+# run command
+python ~/projects/Thesis-NoiseDetection-CNN/generate/generate_reconstructed_data.py $@