mattbitzesty commited on
Commit
2abace4
·
verified ·
1 Parent(s): 4b82654

Upload scripts/hf_gpu_ab_job.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. scripts/hf_gpu_ab_job.py +15 -0
scripts/hf_gpu_ab_job.py CHANGED
@@ -81,6 +81,21 @@ def main() -> int:
81
  (SOURCE_DIR / "artifacts").mkdir(exist_ok=True)
82
  shutil.copy2(ss, SOURCE_DIR / "artifacts" / "scalar_stats_v1.json")
83
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  run([sys.executable, "-m", "pip", "install", "--quiet", "-e", str(SOURCE_DIR)])
85
  sys.path.insert(0, str(SOURCE_DIR / "src"))
86
 
 
81
  (SOURCE_DIR / "artifacts").mkdir(exist_ok=True)
82
  shutil.copy2(ss, SOURCE_DIR / "artifacts" / "scalar_stats_v1.json")
83
 
84
+ # Genuine OpenPOM assets (pom_embeddings.npy + pom_index.json + pom_manifest.json)
85
+ # live in the dataset repo under artifacts/pom/. Stage them into the source tree's
86
+ # artifacts/pom/ so embeddings._load_real_pom() can honour structural_source='openpom_*'.
87
+ pom_src_dir = DATASET_DIR / "artifacts" / "pom"
88
+ if pom_src_dir.exists():
89
+ pom_dst = SOURCE_DIR / "artifacts" / "pom"
90
+ pom_dst.mkdir(parents=True, exist_ok=True)
91
+ for fname in ("pom_embeddings.npy", "pom_index.json", "pom_manifest.json"):
92
+ f = pom_src_dir / fname
93
+ if f.exists():
94
+ shutil.copy2(f, pom_dst / fname)
95
+ log(f"[AB] staged POM assets -> {pom_dst} ({sorted(p.name for p in pom_dst.iterdir())})")
96
+ else:
97
+ log(f"[AB] WARN: no POM assets at {pom_src_dir}; openpom arms will fail")
98
+
99
  run([sys.executable, "-m", "pip", "install", "--quiet", "-e", str(SOURCE_DIR)])
100
  sys.path.insert(0, str(SOURCE_DIR / "src"))
101