Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ pytest-*.xml
*.pyz
*.metadata
*.json
localdata/evals/*
*.png
*.svg

# GitHub and PyPI PepSeqPred logos
!PepSeqPred_logo_black.png
!PepSeqPred_logo_white.png

# Bundled pretrained model artifacts shipped with the package
!src/pepseqpred/api/pretrained_artifacts/**/*.pt
Expand Down
13 changes: 12 additions & 1 deletion scripts/hpc/trainffnn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ WINDOW_SIZE="${WINDOW_SIZE:-1000}"
STRIDE="${STRIDE:-900}"
SPLIT_TYPE="${SPLIT_TYPE:-id-family}" # id-family or id
LABEL_CACHE_MODE="${LABEL_CACHE_MODE:-current}" # current or all
SAVE_VAL_CURVES="${SAVE_VAL_CURVES:-0}" # 1 to enable validation ROC/PR artifacts
VAL_CURVE_MAX_POINTS="${VAL_CURVE_MAX_POINTS:-2048}"
VAL_PLOT_FORMATS="${VAL_PLOT_FORMATS:-png}"

mkdir -p "${SAVE_PATH}"

Expand Down Expand Up @@ -114,6 +117,13 @@ else
TRAIN_MODE_ARGS+=(--train-seeds "$TRAIN_SEEDS")
fi

VAL_CURVE_ARGS=()
if [ "${SAVE_VAL_CURVES}" -eq 1 ]; then
VAL_CURVE_ARGS+=(--save-val-curves)
VAL_CURVE_ARGS+=(--val-curve-max-points "$VAL_CURVE_MAX_POINTS")
VAL_CURVE_ARGS+=(--val-plot-formats "$VAL_PLOT_FORMATS")
fi

${LAUNCHER} torchrun --nproc_per_node=4 train_ffnn.pyz \
--embedding-dirs "${EMBEDDING_DIRS[@]}" \
--label-shards "${LABEL_SHARDS[@]}" \
Expand All @@ -133,6 +143,7 @@ ${LAUNCHER} torchrun --nproc_per_node=4 train_ffnn.pyz \
--results-csv "$RESULTS_CSV" \
--num-workers "$NUM_WORKERS" \
--window-size "$WINDOW_SIZE" \
--stride "$STRIDE"
--stride "$STRIDE" \
"${VAL_CURVE_ARGS[@]}"

# USAGE: sbatch trainffnn.sh /scratch/$USER/esm2/artifacts/pts/shard_000 /scratch/$USER/esm2/artifacts/pts/shard_001 /scratch/$USER/esm2/artifacts/pts/shard_002 /scratch/$USER/esm2/artifacts/pts/shard_003 -- /scratch/$USER/labels/labels_shard_000.pt /scratch/$USER/labels/labels_shard_001.pt /scratch/$USER/labels/labels_shard_002.pt /scratch/$USER/labels/labels_shard_003.pt
Loading
Loading