AQIT 0.1.0
Loading...
Searching...
No Matches
replay_cli.py
Go to the documentation of this file.
1# Copyright (c) 2025-present Aquin Labs Private Limited. All Rights Reserved.
2"""aquin replay simulation"""
3
4import sys
5
6from aquin.cli_flags import reject_legacy_output_flags
7
8
9def _print_help() -> None:
10 print("Replay stored simulation runs.")
11 print("")
12 print("Usage: aquin replay simulation --run_id <id>")
13 print(" aquin replay simulation <run_id>")
14 print("")
15 print("List: aquin list simulation")
16 print("Docs: https://aquin.app/docs/simulation/llm")
17
18
19def cmd_replay(args: list[str]) -> None:
20 if not args or args[0] in ("-h", "--help", "help"):
22 return
24 sub = args[0]
25 rest = args[1:]
26
27 if sub == "watch":
28 print("Removed. Training watch is no longer part of the CLI.", file=sys.stderr)
29 print("Use the SDK: aquin.init() / run.log() / run.checkpoint() → ./aquin_run/", file=sys.stderr)
30 sys.exit(1)
31
32 if sub == "simulation":
34 return
35
36 print(f"Unknown replay subcommand: {sub}")
37 print("Run: aquin replay --help")
38 sys.exit(1)
39
40
41def _cmd_replay_simulation(args: list[str]) -> None:
42 if not args or args[0] in ("-h", "--help", "help"):
43 print("Usage: aquin replay simulation --run_id <id>")
44 print(" aquin replay simulation <run_id>")
45 sys.exit(0 if args and args[0] in ("-h", "--help", "help") else 1)
46
47 reject_legacy_output_flags(args)
48
49 from aquin.cli import _cmd_simulation_catalog
50
51 # Accept positional run_id like replay watch.
52 if args and not args[0].startswith("-"):
53 rest = ["--run_id", args[0], *args[1:]]
54 else:
55 rest = args
56
57 _cmd_simulation_catalog("replay simulation", "load_simulation_run", rest)
None _cmd_replay_simulation(list[str] args)
Definition replay_cli.py:45
None cmd_replay(list[str] args)
Definition replay_cli.py:23