summaryrefslogtreecommitdiff
path: root/research/flossing/late_perturb_robustness/watch_and_plot.sh
diff options
context:
space:
mode:
Diffstat (limited to 'research/flossing/late_perturb_robustness/watch_and_plot.sh')
-rwxr-xr-xresearch/flossing/late_perturb_robustness/watch_and_plot.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/research/flossing/late_perturb_robustness/watch_and_plot.sh b/research/flossing/late_perturb_robustness/watch_and_plot.sh
new file mode 100755
index 0000000..5bb1d8a
--- /dev/null
+++ b/research/flossing/late_perturb_robustness/watch_and_plot.sh
@@ -0,0 +1,32 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+ROOT=/home/yurenh2/rrm
+PY=/home/yurenh2/miniconda3/envs/rrm/bin/python
+cd "${ROOT}"
+
+PIDS=(
+ research/flossing/late_perturb_robustness/logs/trm_baseline_best_step58590_n3000_k8_late.pid
+ research/flossing/late_perturb_robustness/logs/trm_multi4_best_step35805_n3000_k8_late.pid
+ research/flossing/late_perturb_robustness/logs/trm_multi4_final_step65100_n3000_k8_late.pid
+)
+
+for pf in "${PIDS[@]}"; do
+ pid=$(cat "${pf}")
+ echo "watch ${pf}: ${pid}"
+ while kill -0 "${pid}" 2>/dev/null; do
+ sleep 60
+ done
+ echo "done ${pf}: ${pid}"
+done
+
+"${PY}" research/flossing/plot_late_perturb_robustness.py \
+ --summaries \
+ research/flossing/late_perturb_robustness/trm_baseline_best_step58590_n3000_k8_late.summary.csv \
+ research/flossing/late_perturb_robustness/trm_multi4_best_step35805_n3000_k8_late.summary.csv \
+ research/flossing/late_perturb_robustness/trm_multi4_final_step65100_n3000_k8_late.summary.csv \
+ --out-dir research/flossing/late_perturb_robustness/plots \
+ --slice-sigma 0.1
+
+nvidia-smi --query-gpu=index,memory.used,memory.total,utilization.gpu --format=csv,noheader,nounits \
+ > research/flossing/late_perturb_robustness/plots/final_gpu_status.txt