from pathlib import Path def main(): root = Path(__file__).resolve().parents[1] for p in root.rglob("*.yaml"): if ".git" in p.parts or ".trae" in p.parts: continue s = p.read_text(encoding="utf-8") t = s t = t.replace("FineGrained_RL/", "") t = t.replace("datasets/", "data/raw/") t = t.replace("\"runs/", "\"outputs/runs/") t = t.replace(" runs/", " outputs/runs/") t = t.replace("\"logs/", "\"outputs/logs/") t = t.replace(" logs/", " outputs/logs/") if t != s: p.write_text(t, encoding="utf-8") print("yaml path rewrite done") if __name__ == "__main__": main()