Upload eval/launcher.py
Browse files- eval/launcher.py +8 -2
eval/launcher.py
CHANGED
|
@@ -1,6 +1,12 @@
|
|
| 1 |
#!/usr/bin/env python3
|
| 2 |
"""Download all eval script parts from Hub, combine, and execute."""
|
| 3 |
-
import os, sys
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
from huggingface_hub import hf_hub_download
|
| 5 |
|
| 6 |
REPO = "narcolepticchicken/agent-cost-optimizer"
|
|
@@ -11,7 +17,7 @@ parts = [
|
|
| 11 |
"eval/eval_bert_partD.py",
|
| 12 |
]
|
| 13 |
|
| 14 |
-
combined = "
|
| 15 |
with open(combined, "w") as out:
|
| 16 |
for part in parts:
|
| 17 |
path = hf_hub_download(REPO, part)
|
|
|
|
| 1 |
#!/usr/bin/env python3
|
| 2 |
"""Download all eval script parts from Hub, combine, and execute."""
|
| 3 |
+
import os, sys, tempfile
|
| 4 |
+
|
| 5 |
+
# Create working directory
|
| 6 |
+
workdir = tempfile.mkdtemp()
|
| 7 |
+
os.environ["WORKDIR"] = workdir
|
| 8 |
+
print(f"Working directory: {workdir}")
|
| 9 |
+
|
| 10 |
from huggingface_hub import hf_hub_download
|
| 11 |
|
| 12 |
REPO = "narcolepticchicken/agent-cost-optimizer"
|
|
|
|
| 17 |
"eval/eval_bert_partD.py",
|
| 18 |
]
|
| 19 |
|
| 20 |
+
combined = os.path.join(workdir, "eval_bert_combined.py")
|
| 21 |
with open(combined, "w") as out:
|
| 22 |
for part in parts:
|
| 23 |
path = hf_hub_download(REPO, part)
|