# Coarse Fusion 长跑调参

## 启动一轮长跑

```bash
./scripts/evaluation/start_coarse_fusion_tuning_long.sh
```

可用环境变量：

```bash
MAX_EVALS=48 BATCH_SIZE=3 CANDIDATE_POOL_SIZE=512 \
RUN_NAME=coarse_fusion_long_001 \
./scripts/evaluation/start_coarse_fusion_tuning_long.sh
```

启动后会打印：

- `run_name`
- `pid`
- `log`
- `run_dir`

默认搜索空间：

- `scripts/evaluation/tuning/coarse_rank_fusion_space.yaml`

默认 baseline seed：

- `artifacts/search_evaluation/batch_reports/batch_20260415T150754Z_00b6a8aa3d.md`

## 查看进度

```bash
tail -f artifacts/search_evaluation/tuning_launches/<run_name>.log
cat artifacts/search_evaluation/tuning_runs/<run_name>/leaderboard.csv
sed -n '1,200p' artifacts/search_evaluation/tuning_runs/<run_name>/summary.md
```

实时记录文件：

- `trials.jsonl`
- `leaderboard.csv`
- `summary.json`
- `summary.md`

## 续跑

```bash
./scripts/evaluation/resume_coarse_fusion_tuning_long.sh <run_name>
```

也可直接传完整目录：

```bash
./scripts/evaluation/resume_coarse_fusion_tuning_long.sh \
  artifacts/search_evaluation/tuning_runs/<run_name>
```

## 停止

```bash
kill "$(cat artifacts/search_evaluation/tuning_launches/<run_name>.pid)"
```

## 说明

- 每轮会自动写入 `config/config.yaml`
- 每轮会自动执行 `./restart.sh backend`
- 如果 `eval-web` 因 backend 重启不可用，调参器会尝试补拉起 `eval-web`
- 默认不 `apply-best`，跑完后会恢复 baseline 配置
