hallucination / mechanistic_interp /scripts /plot_variant_auc.sh
ToiTenBao's picture
Upload hallucination folder
a2ffd07 verified
Raw
History Blame Contribute Delete
1.04 kB
#!/bin/bash
# Plot per-variant AUC of the 4-variant SequenceLayerProbes (toilet, bathroom),
# showing one probe detects each concept equally across base/lora/nullu/efuf.
#
# Tunables (override via env):
# MD source metrics markdown (default mechanistic_interp/graph/seqprobe_metrics.md)
# OUT output PNG (default mechanistic_interp/graph/seqprobe_variant_auc.png)
# YMIN lower y-limit (default auto)
#
# Usage:
# bash mechanistic_interp/scripts/plot_variant_auc.sh
# YMIN=0.99 bash mechanistic_interp/scripts/plot_variant_auc.sh
set -euo pipefail
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
MD="${MD:-${REPO_ROOT}/mechanistic_interp/graph/seqprobe_metrics.md}"
OUT="${OUT:-${REPO_ROOT}/mechanistic_interp/graph/seqprobe_variant_auc.png}"
cd "${REPO_ROOT}"
export PYTHONPATH="$(cd .. && pwd):$(pwd):${PYTHONPATH:-}"
ARGS=(--md "${MD}" --out "${OUT}")
[ -n "${YMIN:-}" ] && ARGS+=(--ymin "${YMIN}")
python -m mechanistic_interp.plot_variant_auc "${ARGS[@]}" "$@"