AQIT
0.1.0
Toggle main menu visibility
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
4
import
sys
5
6
from
aquin.cli_flags
import
reject_legacy_output_flags
7
8
9
def
_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
19
def
cmd_replay
(args: list[str]) ->
None
:
20
if
not
args
or
args[0]
in
(
"-h"
,
"--help"
,
"help"
):
21
_print_help
()
22
return
23
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"
:
33
_cmd_replay_simulation
(rest)
34
return
35
36
print(f
"Unknown replay subcommand: {sub}"
)
37
print(
"Run: aquin replay --help"
)
38
sys.exit(1)
39
40
41
def
_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)
aquin.cli_flags
Definition
cli_flags.py:1
aquin.cli
Definition
cli.py:1
aquin.replay_cli._cmd_replay_simulation
None _cmd_replay_simulation(list[str] args)
Definition
replay_cli.py:45
aquin.replay_cli.cmd_replay
None cmd_replay(list[str] args)
Definition
replay_cli.py:23
aquin.replay_cli._print_help
None _print_help()
Definition
replay_cli.py:13
aquin
replay_cli.py
AQIT · Aquin Labs Private Limited · Apache 2.0 · Generated by
1.18.0