File size: 1,837 Bytes
70b98a5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
export PATH=/venv/main/bin:/usr/local/bin:/usr/bin:/bin
export PYTHONDONTWRITEBYTECODE=1
export CUDA_VISIBLE_DEVICES=0
export WORK=/dev/shm/eval
export QUIP_DIR=$WORK/quip-sharp
export HF_DATASETS_TRUST_REMOTE_CODE=1
export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True

log() { echo "[$(date '+%Y-%m-%d %H:%M:%S')] $*"; }

# 1. Wait for current eval (PID 7303) to finish
log "Waiting for current eval (PID 7303) to finish..."
while ps -p 7303 > /dev/null 2>&1; do
    sleep 30
done
log "Current eval finished!"

# 2. Print results summary
log "============================================"
log "  RESULTS FROM RUN 1 (core tasks)"
log "============================================"
python3 $WORK/print_results.py $WORK/results_a/full_results.json

# 3. Start remaining tasks
log "============================================"
log "  STARTING RUN 2 (remaining tasks)"
log "============================================"

cd $WORK/lm-evaluation-harness

python $WORK/eval_polish_quip.py \
    --model_path $WORK/model \
    --tokenizer speakleash/Bielik-11B-v2.3-Instruct \
    --output_dir $WORK/results_a_remaining \
    --num_fewshot 5 \
    --batch_size 8 \
    --tasks polish_belebele_mc polish_belebele_regex \
        polish_dyk_multiple_choice polish_dyk_regex \
        polish_klej_ner_multiple_choice polish_klej_ner_regex \
        polish_polqa_reranking_multiple_choice polish_polqa_open_book polish_polqa_closed_book \
        polish_poquad_open_book \
        polish_eq_bench polish_eq_bench_first_turn \
        polish_poleval2018_task3_test_10k \
    2>&1

log "============================================"
log "  ALL DONE - both runs complete"
log "============================================"
log "Results 1: $WORK/results_a/full_results.json"
log "Results 2: $WORK/results_a_remaining/full_results.json"