-
Notifications
You must be signed in to change notification settings - Fork 0
/
plot.py
43 lines (33 loc) · 1.02 KB
/
plot.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
from src.utilities import *
import argparse
def plot(exp_name: str):
"""
plot main function
"""
# plot reward
plot_reward(exp_name=exp_name)
# plot success
plot_success(exp_name=exp_name)
# plot time
plot_time(exp_name=exp_name)
# plot steps
plot_steps(exp_name=exp_name)
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--exp_name', type=str, default='4.17.12:36',
help='name of current experiment')
parser.add_argument('--mode', type=str, default='train',
help='plot result of training or testing')
args = parser.parse_args()
# # plot reward
# plot_reward(exp_name=args.exp_name)
# # plot success
# plot_success(exp_name=args.exp_name)
# # plot time
# plot_time(exp_name=args.exp_name)
# # plot steps
# plot_steps(exp_name=args.exp_name)
if args.mode == 'train':
plot(exp_name=args.exp_name)
else:
plot_test(exp_name=args.exp_name)