File size: 659 Bytes
fd0c71a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env python3
"""Export adapter artifacts."""

from __future__ import annotations

import json
from pathlib import Path

import sys

ROOT = Path(__file__).resolve().parents[1]
if str(ROOT) not in sys.path:
    sys.path.insert(0, str(ROOT))


def main() -> None:
    root = Path(__file__).resolve().parents[1]
    out = root / "checkpoints" / "adapters"
    out.mkdir(parents=True, exist_ok=True)
    (out / "adapter_manifest.json").write_text(
        json.dumps({"adapters": ["sft", "planner_grpo", "dosing_grpo"]}, ensure_ascii=True, indent=2),
        encoding="utf-8",
    )
    print("adapters_exported")


if __name__ == "__main__":
    main()