Skip attribution for next-token runs
This commit is contained in:
@@ -91,6 +91,23 @@ raise SystemExit(0 if isinstance(extra, list) and len(extra) > 0 else 1)
|
|||||||
PY
|
PY
|
||||||
}
|
}
|
||||||
|
|
||||||
|
run_is_all_future() {
|
||||||
|
"${PYTHON_BIN}" - "$1" <<'PY'
|
||||||
|
import json
|
||||||
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
cfg_path = Path(sys.argv[1]) / "train_config.json"
|
||||||
|
try:
|
||||||
|
cfg = json.loads(cfg_path.read_text(encoding="utf-8"))
|
||||||
|
except Exception:
|
||||||
|
raise SystemExit(1)
|
||||||
|
|
||||||
|
mode = str(cfg.get("model_target_mode", "next_token")).lower()
|
||||||
|
raise SystemExit(0 if mode == "all_future" else 1)
|
||||||
|
PY
|
||||||
|
}
|
||||||
|
|
||||||
for run_path in runs/*; do
|
for run_path in runs/*; do
|
||||||
[[ -d "${run_path}" ]] || continue
|
[[ -d "${run_path}" ]] || continue
|
||||||
|
|
||||||
@@ -124,6 +141,11 @@ for run_path in runs/*; do
|
|||||||
"df_auc_landmark_unpooled.csv" \
|
"df_auc_landmark_unpooled.csv" \
|
||||||
"${PYTHON_BIN}" evaluate_auc_v2.py "${common[@]}" "${auc_extra[@]}"
|
"${PYTHON_BIN}" evaluate_auc_v2.py "${common[@]}" "${auc_extra[@]}"
|
||||||
|
|
||||||
|
if ! run_is_all_future "${run_path}"; then
|
||||||
|
echo " skip attribution evaluations: model_target_mode is not all_future"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "${RUN_EXTRA_INFO_ATTRIBUTION}" == "1" ]]; then
|
if [[ "${RUN_EXTRA_INFO_ATTRIBUTION}" == "1" ]]; then
|
||||||
if run_has_extra_info "${run_path}"; then
|
if run_has_extra_info "${run_path}"; then
|
||||||
run_dir_result_if_missing \
|
run_dir_result_if_missing \
|
||||||
|
|||||||
Reference in New Issue
Block a user