forked from GareBear99/ARC-Neuron-LLMBuilder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcognition_lab.py
More file actions
33 lines (26 loc) · 1.77 KB
/
Copy pathcognition_lab.py
File metadata and controls
33 lines (26 loc) · 1.77 KB
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
30
31
32
33
from __future__ import annotations
import argparse
import subprocess
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parent
COMMANDS = {
"validate": [sys.executable, str(ROOT / "scripts" / "validate_repo.py")],
"count-data": [sys.executable, str(ROOT / "scripts" / "build_dataset.py")],
"count-benchmarks": [sys.executable, str(ROOT / "scripts" / "run_benchmarks.py")],
"backend-check": [sys.executable, str(ROOT / "scripts" / "execution" / "check_local_backend.py")],
"candidate-gate": [sys.executable, str(ROOT / "scripts" / "execution" / "run_full_candidate_gate.py")],
"train-functioning-model": [sys.executable, str(ROOT / "scripts" / "training" / "train_exemplar_candidate.py"), "--candidate", "darpa_functional"],
"run-functioning-model": [sys.executable, str(ROOT / "scripts" / "execution" / "run_functioning_candidate.py"), "--candidate", "darpa_functional"],
"doctor-runtime": [sys.executable, str(ROOT / "scripts" / "runtime" / "doctor_direct_runtime.py"), "--adapter", "exemplar", "--artifact", str(ROOT / "exports" / "candidates" / "darpa_functional" / "exemplar_train" / "artifact_manifest.json")],
"compile-llamafile-help": [sys.executable, str(ROOT / "scripts" / "runtime" / "compile_llamafile_from_binary.py"), "--help"],
"user-prompt-help": ["bash", str(ROOT / "scripts" / "operator" / "run_local_prompt.sh")],
"benchmark-local-help": ["bash", str(ROOT / "scripts" / "operator" / "benchmark_local_model.sh")],
}
def main() -> None:
parser = argparse.ArgumentParser(description="Cognition lab control entrypoint")
parser.add_argument("command", choices=sorted(COMMANDS))
args = parser.parse_args()
raise SystemExit(subprocess.call(COMMANDS[args.command], cwd=ROOT))
if __name__ == "__main__":
main()