-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathquick_start.py
More file actions
46 lines (39 loc) · 1.45 KB
/
quick_start.py
File metadata and controls
46 lines (39 loc) · 1.45 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
34
35
36
37
38
39
40
41
42
43
44
45
46
import subprocess
import sys
def run_command(command):
"""Runs a command and prints its output in real-time."""
print(f"\n{'='*80}\nRunning command: {' '.join(command)}\n{'='*80}")
try:
result = subprocess.run(command, check=True, text=True, encoding='utf-8')
return result.returncode
except FileNotFoundError:
print(f"Error: Command not found. Please ensure '{command[0]}' is in your PATH.")
return -1
except subprocess.CalledProcessError as e:
print(f"\nError: Command exited with non-zero status {e.returncode}")
return e.returncode
except Exception as e:
print(f"An unexpected error occurred: {e}")
return -1
def main():
"""Runs the quick start experiments."""
print("--- Starting Quick Start ---")
# Command 1: Run vanilla agent with gpt41mini, equation difficulty as easy and model system as vanilla equation
command1 = [
"python", "run_experiments.py",
"--model_name", "gpt41mini",
"-b", "vanilla_agent",
"-t", "1"
]
# Command 2: Run code-assisted agent with gpt41mini, equation difficulty as easy and model system as vanilla equation
command2 = [
"python", "run_experiments.py",
"--model_name", "gpt41mini",
"-b", "code_assisted_agent",
"-t", "1"
]
run_command(command1)
run_command(command2)
print("\n--- Quick Start Finished ---")
if __name__ == "__main__":
main()