File size: 920 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
#!/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}"