From 8befef5fc1e4f1004a390e1c5b17d910455939ef Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Thu, 14 Nov 2024 19:55:59 +0000 Subject: [PATCH] =?UTF-8?q?slurm/dlr:=20logging=20it=20Should=E2=84=A2=20w?= =?UTF-8?q?ork=20now=3F=20TODO=20test=20this!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aimodel/slurm-TEST-deeplabv3p-rainfall.job | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/aimodel/slurm-TEST-deeplabv3p-rainfall.job b/aimodel/slurm-TEST-deeplabv3p-rainfall.job index ceca681..51298ea 100755 --- a/aimodel/slurm-TEST-deeplabv3p-rainfall.job +++ b/aimodel/slurm-TEST-deeplabv3p-rainfall.job @@ -30,12 +30,10 @@ if command_exists module; then module load python/anaconda/4.6/miniconda/3.7 else - echo "[bash/runner]: module command not present, not loading modules" >&2; + echo "[slurm_runner]: module command not present, not loading modules" >&2; fi - - show_help() { echo -e "Trains a TEST DeepLabv3+ model using rainfall radar and water depth data." >&2; echo -e "" >&2; @@ -102,13 +100,15 @@ echo ">>> Installing requirements"; if [[ -n "${USE_CONDA}" ]]; then conda run -n py38 pip install -q -r requirements.txt; else - echo "[bash/runner]: USE_CONDA env var NOT specified, not installing pip packages." >&2; + echo "[slurm_runner]: USE_CONDA env var NOT specified, not installing pip packages." >&2; fi echo ">>> Training model"; #shellcheck disable=SC2016 if [[ -n "${USE_CONDA}" ]]; then + echo "[slurm_runner]: Running harness via conda as USE_CONDA env var was defined" >&2; /usr/bin/env time -v conda run -n py38 bash -c 'src/deeplabv3_plus_test_rainfall.py >>"${DIR_OUTPUT}/experiment.${SLURM_JOB_ID}.out.log" 2>>"${DIR_OUTPUT}/experiment.${SLURM_JOB_ID}.err.log"; echo "[slurm_runner] EXIT_CODE: $?" >>"${DIR_OUTPUT}/experiment.${SLURM_JOB_ID}.out.log";'; else + echo "[slurm_runner]: Ignoring conda and running harness directly as USE_CONDA env var was NOT defined" >&2; /usr/bin/env time -v src/deeplabv3_plus_test_rainfall.py >>"${DIR_OUTPUT}/experiment.${SLURM_JOB_ID}.out.log" 2>>"${DIR_OUTPUT}/experiment.${SLURM_JOB_ID}.err.log"; echo "[slurm_runner] EXIT_CODE: $?" >>"${DIR_OUTPUT}/experiment.${SLURM_JOB_ID}.out.log"; fi