hallucination / mechanistic_interp /scripts /plot_probe_latent_metrics.sh
ToiTenBao's picture
Upload hallucination folder
a2ffd07 verified
Raw
History Blame Contribute Delete
920 Bytes
#!/bin/bash
# Plot AUC / F1 vs layer for the latent probes (toilet & bathroom).
# Reads mechanistic_interp/logs/probe_latent_{object}.log and writes a PNG.
#
# LOG_DIR dir holding probe_latent_{object}.log (default: .../logs)
# OUT output PNG path
# OBJECTS space-separated object names (default: "toilet bathroom")
set -euo pipefail
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
cd "${REPO_ROOT}"
export PYTHONPATH="$(cd "${REPO_ROOT}/.." && pwd):${REPO_ROOT}"
export TMPDIR=/data/caotue/tmp
LOG_DIR="${LOG_DIR:-mechanistic_interp/logs}"
OUT="${OUT:-mechanistic_interp/graph/probe_latent_metrics.png}"
OBJECTS="${OBJECTS:-toilet bathroom}"
TITLE="${TITLE:-Latent probe — validation metrics per layer}"
python mechanistic_interp/scripts/plot_probe_latent_metrics.py \
--log_dir "${LOG_DIR}" \
--out "${OUT}" \
--objects ${OBJECTS} \
--title "${TITLE}"