modelclinic-experiment-001 / code /src /download_published_diff.py
PratikBuilds's picture
Publish initial ModelClinic Experiment 001 archive
87cc7f2 verified
Raw History Blame Contribute Delete
971 Bytes
"""Fetch the original sparse edit and manifest from the pinned upstream commit."""
import argparse
import hashlib
from pathlib import Path
import requests
BASE_URL = "https://raw.githubusercontent.com/RikiyaT/lm_understand-logs/4d09ba6d6a7e891dd8063974dfe81b3d78e3494f/exp8_math/runs/p50c/edit"
def main():
parser = argparse.ArgumentParser()
parser.add_argument("--output-dir", type=Path, default=Path("results/checkpoint_analysis"))
args = parser.parse_args()
args.output_dir.mkdir(parents=True, exist_ok=True)
for name in ("edit.npz", "manifest.json"):
response = requests.get(f"{BASE_URL}/{name}", timeout=60)
response.raise_for_status()
path = args.output_dir / ("published_sparse_edit.npz" if name == "edit.npz" else name)
path.write_bytes(response.content)
print(f"saved {path.name}; sha256={hashlib.sha256(response.content).hexdigest()}")
if __name__ == "__main__":
main()