File size: 1,036 Bytes
a2ffd07 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | #!/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[@]}" "$@"
|