Skip to content

Commit

Permalink
helper scripts for running sampling on JASMIN/LOTUS
Browse files Browse the repository at this point in the history
  • Loading branch information
henryaddison committed Aug 5, 2024
1 parent f7f62a1 commit e9f327b
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
21 changes: 21 additions & 0 deletions bin/jasmin/lotus-sampling-wrapper
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
# Wrapper script around commands for training a model to queue on LOTUS on JASMIN

source ~/.bashrc
mamba activate mv-mlde

set -euo pipefail

cd /home/users/vf20964/code/mlde

export DERIVED_DATA=/gws/nopw/j04/bris_climdyn/henrya/bp-backups/
export KK_SLACK_WH_URL=https://hooks.slack.com
export WANDB_EXPERIMENT_NAME="ml-downscaling-emulator"

checkpoint=$1
em=$2
dataset=$3
split=$4
workdir=$5

python bin/predict.py --checkpoint ${checkpoint} --num-samples 1 --dataset ${dataset} --split ${split} --ensemble-member ${em} ${workdir}
17 changes: 17 additions & 0 deletions bin/jasmin/queue-sampling
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
# Script for queueing a training job on LOTUS on JASMIN via lotus-wrapper script

set -euo pipefail

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

# 12em NCSN++
# /gws/nopw/j04/bris_climdyn/henrya/workdirs/score-sde/deterministic/ukcp_local_pr_12em_cncsnpp/bham_pSTV

# 12em Plain U-Net
# /gws/nopw/j04/bris_climdyn/henrya/workdirs/score-sde/deterministic/ukcp_local_pr_12em_plain_unet/bham_pSTV

# 1em Plain U-Net
# /gws/nopw/j04/bris_climdyn/henrya/workdirs/score-sde/deterministic/ukcp_local_pr_1em_plain_unet/bham_pSTV

for em in 01; do sbatch --gres=gpu:1 --partition=orchid --account=orchid --time=01:00:00 --mem=16G -- ${SCRIPT_DIR}/lotus-sampling-wrapper epoch_100 ${em} bham64_ccpm-4x_1em_vort850_pr val /gws/nopw/j04/bris_climdyn/henrya/workdirs/score-sde/deterministic/ukcp_local_pr_1em_plain_unet/bham_pSTV; done

0 comments on commit e9f327b

Please sign in to comment.