#!/bin/bash # 终链: 等 e8+pb -> 2of4 投票 -> dropper -> 双门控 set -x export PYTHONPATH=/root/patientphex/retrain_t1/code PY=/root/patientphex/judge_venv/bin/python C=/root/patientphex/retrain_t1/code R=$C/artifacts/b_retrain B=/root/patientphex/PatientPheX-V1-B/PatientPheX-V1-B.jsonl for i in $(seq 1 240); do grep -q E8_MERGE_DONE /root/patientphex/e8_infer.out 2>/dev/null && \ grep -q PB_CHAIN_DONE /root/patientphex/pb_chain.out 2>/dev/null && break sleep 30 done grep -q E8_MERGE_DONE /root/patientphex/e8_infer.out || { echo E8_NOT_DONE; exit 1; } grep -q PB_CHAIN_DONE /root/patientphex/pb_chain.out || { echo PB_NOT_DONE; exit 1; } echo PRODUCERS_ALL_READY $PY $C/scripts/build_phenobert_majority_submission.py \ --template $R/ref/B-v13-producer-rescue-ppl.jsonl \ --current $R/B-task1-ensemble-q3636.jsonl \ --new $R/plus-e8-B-longest_abbr.jsonl \ --released $R/plus-released-B-longest_abbr.jsonl \ --phenobert $R/B-phenobert-official-hpo2026.jsonl \ --output $R/B-v24-rebuilt.jsonl || { echo VOTE_FAIL; exit 2; } echo VOTE_DONE $PY /root/patientphex/count_ents.py $R/B-v24-rebuilt.jsonl 6757 cd /root/patientphex/retrain_t1 $PY tmp/bday_dropper.py \ --final $R/B-v24-rebuilt.jsonl \ --corpus $B \ --current $R/B-task1-ensemble-q3636.jsonl \ --new $R/plus-e8-B-longest_abbr.jsonl \ --released $R/plus-released-B-longest_abbr.jsonl \ --phenobert $R/B-phenobert-official-hpo2026.jsonl \ --output $R/B-v24-rebuilt-dropped.jsonl || { echo DROPPER_FAIL; exit 3; } echo DROPPER_DONE $PY /root/patientphex/count_ents.py $R/B-v24-rebuilt-dropped.jsonl 6290 echo VOTE_DROPPER_DONE