File size: 968 Bytes
a7e82fd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env bash
# One bench run on the pod: pod_run.sh <name> <config|author:flags> <rows> [limit]   -> /workspace/runs/<name>.jsonl (+ .log)
set -uo pipefail
W=/workspace; N=$1; C=$2; R=$3; L=${4:-0}
export PATH=$W/venv/bin:$PATH PYTHONPATH=$W/engine/reax14:$W/engine HF_HUB_OFFLINE=1 TRANSFORMERS_OFFLINE=1 HF_HUB_DISABLE_TELEMETRY=1 \
  OPENAI_API_KEY= PYTORCH_ALLOC_CONF=expandable_segments:True CIE_LAZY_LOAD=1 REAX_PROFILE=reference \
  TRITON_CACHE_DIR=$W/cache/triton TORCHINDUCTOR_CACHE_DIR=$W/cache/inductor
cd $W/engine
if [[ $C == author:* ]]; then
  flags=${C#author:}; flags=${flags//,/ }
  cd bench && python karpo_author_run.py --checkpoint $W/model/part-karpo --rows $R --out $W/runs/$N.jsonl --limit $L $flags > $W/runs/$N.log 2>&1
else
  python bench/hfdi_speed.py run --config reax14/$C.json --model $W/model --rows $R --out $W/runs/$N.jsonl --warmup-rows $W/rows/warm.jsonl --limit $L > $W/runs/$N.log 2>&1
fi
echo "exit $?" >> $W/runs/$N.log