-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.py
More file actions
34 lines (24 loc) · 1000 Bytes
/
run.py
File metadata and controls
34 lines (24 loc) · 1000 Bytes
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
"""CLI entry point for AppAgent training."""
import argparse
import logging
from dotenv import load_dotenv
load_dotenv()
from appagent.orchestrator import run_training
def main():
parser = argparse.ArgumentParser(description="AppAgent — train computer-use agents")
parser.add_argument("--app", required=True, help="App name (directory under agents/)")
parser.add_argument("--cycles", type=int, default=10, help="Number of training cycles")
parser.add_argument("--time-per-cycle", type=int, default=300, help="Seconds per cycle")
parser.add_argument("--verbose", "-v", action="store_true", help="Verbose logging")
args = parser.parse_args()
logging.basicConfig(
level=logging.DEBUG if args.verbose else logging.INFO,
format="%(asctime)s %(name)s %(levelname)s %(message)s",
)
run_training(
app_name=args.app,
num_cycles=args.cycles,
time_per_cycle=args.time_per_cycle,
)
if __name__ == "__main__":
main()