File size: 720 Bytes
adc02fa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/usr/bin/env bash
set -euo pipefail

ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$ROOT_DIR"

DEBUG_ROOT="${DOVLA_DEBUG_ROOT:-outputs/phase5_train_debug}"
DATASET_DIR="$DEBUG_ROOT/cil"
CHECKPOINT="$DEBUG_ROOT/run/best.pt"
OUT_PATH="${DOVLA_EVAL_OUT:-outputs/phase5_eval/causalstress.json}"

if [[ ! -f "$CHECKPOINT" || ! -f "$DATASET_DIR/manifest.json" ]]; then
  DOVLA_DEBUG_ROOT="$DEBUG_ROOT" bash scripts/run_train_debug.sh
fi

python scripts/eval_causalstress.py \
  --checkpoint "$CHECKPOINT" \
  --backend toy \
  --out "$OUT_PATH" \
  --num-tasks "${DOVLA_EVAL_NUM_TASKS:-6}" \
  --k "${DOVLA_EVAL_K:-4}" \
  --seed 0 \
  --device "${DOVLA_DEVICE:-auto}"

echo "evaluation output: $OUT_PATH"