Skip to content

Commit 684e1ed

Browse files
author
Jon Saad-Falcon
committed
feat: generate samples working
1 parent 32d6371 commit 684e1ed

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"request": "launch",
2626
"program": "scripts/generate_samples.py",
2727
"args": [
28-
"run_name=test_hf_level_1",
28+
"run_name=test_hf_archon_level_1",
2929
"dataset_src=huggingface",
3030
"level=1",
3131
"num_workers=50",
@@ -42,7 +42,7 @@
4242
"program": "scripts/eval_from_generations.py",
4343
"args": [
4444
"level=1",
45-
"run_name=test_hf_level_1",
45+
"run_name=test_hf_archon_level_1",
4646
"dataset_src=local",
4747
"num_gpu_devices=8",
4848
"timeout=300"

scripts/generate_samples.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ def main(config: GenerationConfig):
190190
model_name=config.model_name,
191191
temperature=config.temperature,
192192
max_tokens=config.max_tokens,
193+
archon_config_path=config.archon_config_path,
193194
verbose=config.verbose)
194195

195196
# Launch workers

src/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ def query_server(
147147
client = OpenAI(api_key=OPENAI_KEY)
148148
model = model_name
149149
case "archon":
150+
assert archon_config_path is not None, "Archon config path is required"
151+
assert os.path.exists(archon_config_path), f"Archon config path {archon_config_path} does not exist"
150152
client = Archon(json.load(open(archon_config_path)))
151153
model = model_name
152154
case _:

0 commit comments

Comments
 (0)