-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplot_new_reach.py
47 lines (39 loc) · 1.43 KB
/
plot_new_reach.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
import numpy as np
import matplotlib.pyplot as plt
import csv
import pandas as pd
import click
from plot_utils import *
@click.command()
@click.option('--name', default='cheetah-vel__2022-08-25_09-17-39')
def main(name):
name='reach-v2__2022-08-29_10-02-30'
# name = 'reach-v2__2022-08-29_10-02-55'
# name = 'reach-v2__2022-08-29_10-03-57'
name = 'reach-v2__2022-08-29_10-04-35'
names = []
path = 'output/' + name + '/reach-v2/debug/'
mine_testing_data = \
data_read(paths=[path + 'progress.csv'],
load_name='AverageReturn_all_test_tasks')
mine_training_context_data = \
data_read([path + 'progress.csv'],
load_name='AverageTrainReturn_all_train_tasks')
mine_training_data = \
data_read([path + 'progress.csv'],
load_name='AverageReturn_all_train_tasks')
# print(maml_data[0][-1],maml_data[1][-1])
datas = [mine_testing_data, mine_training_context_data, mine_training_data]
legends = ['CPEARL-testing', 'CPEARL-training-context', 'CPEARL-training']
# datas = [mine_data_new_intr, promp_data, erl2_data, mame_data]
# legends = ['MetaCURE', 'ProMP', 'E-RL^2', 'MAME']
plot_all(datas, legends, 0)
plt.title('Reach-V2', size=30)
# plt.plot(mine_data_new_intr[0], np.ones(mine_data_new_intr[0].shape) * 9.98, color='olive', linestyle='--',
# linewidth=2, label='EPI')
# legend()
plt.tight_layout()
plt.show()
# plt.savefig("figures/curves/" + name + ".png")
if __name__ =="__main__":
main()