Repository navigation
Expand file tree
/
Copy pathrun_ge_collect.sh
More file actions
62 lines (54 loc) · 1.91 KB
/
Copy pathrun_ge_collect.sh
File metadata and controls
62 lines (54 loc) · 1.91 KB
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
53
54
55
56
57
58
59
60
61
62
#!/bin/bash
# run_ge_collect.sh — Phase 2: collect PAR2 results after SLURM jobs finish
#
# Run this after SLURM jobs submitted by genetic_evolution.py --submit_only
# have completed. Collects PAR2 scores and selects top-k offspring.
#
# Usage:
# ./run_ge_collect.sh <cc|nersc> <generation_tag> <output_tag> [options]
#
# Examples:
# ./run_ge_collect.sh nersc gemini_trial5 gemini_trial5_gen1_v1
#
# Arguments:
# cc|nersc - Cluster (selects evaluation backend)
# generation_tag - Source population tag (same as used in Phase 1)
# output_tag - Output tag (same as used in Phase 1)
set -euo pipefail
if [ $# -lt 3 ]; then
echo "Usage: $0 <cc|nersc> <generation_tag> <output_tag>"
exit 1
fi
CLUSTER="$1"
GENERATION_TAG="$2"
OUTPUT_TAG="$3"
NERSC_FLAG=""
if [ "$CLUSTER" = "nersc" ]; then
NERSC_FLAG="--nersc"
elif [ "$CLUSTER" != "cc" ]; then
echo "ERROR: cluster must be 'cc' or 'nersc', got '$CLUSTER'"
exit 1
fi
PAR2_KEEP_TOP_N="${PAR2_KEEP_TOP_N:-7}"
_CFG_MODEL=$(grep '^default_model:' path_config.yaml 2>/dev/null | sed 's/^default_model:[[:space:]]*//' | tr -d '"' || true)
MODEL="${MODEL:-${_CFG_MODEL:-gemini-3-flash-preview}}"
echo "============================================"
echo "GE Phase 2: Collect Results"
echo " Cluster: $CLUSTER"
echo " Generation tag: $GENERATION_TAG"
echo " Output tag: $OUTPUT_TAG"
echo " par2_keep_top_n: $PAR2_KEEP_TOP_N"
echo "============================================"
python src/llmsat/pipelines/genetic_evolution.py \
--generation_tag "$GENERATION_TAG" \
--output_tag "$OUTPUT_TAG" \
--collect_results \
--par2_keep_top_n "$PAR2_KEEP_TOP_N" \
--model "$MODEL" \
$NERSC_FLAG
echo ""
echo "============================================"
echo "Collection complete. Top-tier saved under: outputs/$OUTPUT_TAG/"
echo ""
echo "Next: run loop a to promote top leaders:"
echo "============================================"