-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcli.py
50 lines (29 loc) · 894 Bytes
/
cli.py
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
47
48
49
50
import click
from click_repl import register_repl
from rl.cli import cli_run_sac, cli_run_td3, cli_run_td7, cli_replay_agent
@click.group()
def main():
"""CLI."""
@click.group()
def rl() -> None:
"""
Run Off-Policy Reinforcement Learning Algorithms.
Examples:
# I recommend reading docstring of each command.
>>> rl sac --help
# Run default setting
>>> rl sac
# You can load hyper-parameter via *.yaml
>> rl sac -c config/common.yaml
# You can specify the run name.
>>> rl sac --run-name Ant@Seed42
# You want to record the video while training,
>>> rl sac --record-video"""
rl.add_command(cli_run_sac)
rl.add_command(cli_run_td3)
rl.add_command(cli_run_td7)
main.add_command(rl)
main.add_command(cli_replay_agent)
if __name__ == "__main__":
register_repl(main)
main()