fix: derive OUTPUT from config output_dir so CONFIG override counts correctly
This commit is contained in:
@@ -26,7 +26,6 @@ TARGET=30
|
|||||||
CONFIG="${CONFIG:-config/question_gen_ar30.yaml}"
|
CONFIG="${CONFIG:-config/question_gen_ar30.yaml}"
|
||||||
STORE_DIR="${STORE_DIR:-store}"
|
STORE_DIR="${STORE_DIR:-store}"
|
||||||
DB_PATH="${DB_PATH:-logs/question_gen_ar30.db}"
|
DB_PATH="${DB_PATH:-logs/question_gen_ar30.db}"
|
||||||
OUTPUT="store/questions/generated-ar30/accepted_questions.json"
|
|
||||||
MAX_ROUNDS=10
|
MAX_ROUNDS=10
|
||||||
BASE_SEED=2024
|
BASE_SEED=2024
|
||||||
EARLY_STOP_ROUNDS="${EARLY_STOP_ROUNDS:-2}" # 连续 N 轮 0 产出则提前停止
|
EARLY_STOP_ROUNDS="${EARLY_STOP_ROUNDS:-2}" # 连续 N 轮 0 产出则提前停止
|
||||||
@@ -40,6 +39,12 @@ source .env
|
|||||||
|
|
||||||
PYTHON="$(conda run -n Video-Tree-TRM which python)"
|
PYTHON="$(conda run -n Video-Tree-TRM which python)"
|
||||||
|
|
||||||
|
# OUTPUT 从 CONFIG 的 output_dir 推导,使 CONFIG 覆盖时计数路径自动跟随;可用 OUTPUT env 覆盖
|
||||||
|
if [ -z "${OUTPUT:-}" ]; then
|
||||||
|
OUTPUT_DIR="$("$PYTHON" -c "import yaml; print(yaml.safe_load(open('$CONFIG'))['question_gen_v2']['output_dir'])")"
|
||||||
|
OUTPUT="${OUTPUT_DIR}/accepted_questions.json"
|
||||||
|
fi
|
||||||
|
|
||||||
count_accepted() {
|
count_accepted() {
|
||||||
if [ -f "$OUTPUT" ]; then
|
if [ -f "$OUTPUT" ]; then
|
||||||
"$PYTHON" -c "
|
"$PYTHON" -c "
|
||||||
|
|||||||
Reference in New Issue
Block a user