remove wandb when is_eval, change smooth action to conv 5
这个提交包含在:
@ -111,6 +111,7 @@ def main(args):
|
|||||||
os.makedirs(ckpt_dir)
|
os.makedirs(ckpt_dir)
|
||||||
config_path = os.path.join(ckpt_dir, 'config.pkl')
|
config_path = os.path.join(ckpt_dir, 'config.pkl')
|
||||||
expr_name = ckpt_dir.split('/')[-1]
|
expr_name = ckpt_dir.split('/')[-1]
|
||||||
|
if not is_eval:
|
||||||
wandb.init(project="mobile-aloha", reinit=True, entity="mobile-aloha", name=expr_name)
|
wandb.init(project="mobile-aloha", reinit=True, entity="mobile-aloha", name=expr_name)
|
||||||
wandb.config.update(config)
|
wandb.config.update(config)
|
||||||
with open(config_path, 'wb') as f:
|
with open(config_path, 'wb') as f:
|
||||||
@ -120,7 +121,7 @@ def main(args):
|
|||||||
results = []
|
results = []
|
||||||
for ckpt_name in ckpt_names:
|
for ckpt_name in ckpt_names:
|
||||||
success_rate, avg_return = eval_bc(config, ckpt_name, save_episode=True, num_rollouts=1)
|
success_rate, avg_return = eval_bc(config, ckpt_name, save_episode=True, num_rollouts=1)
|
||||||
wandb.log({'success_rate': success_rate, 'avg_return': avg_return})
|
# wandb.log({'success_rate': success_rate, 'avg_return': avg_return})
|
||||||
results.append([ckpt_name, success_rate, avg_return])
|
results.append([ckpt_name, success_rate, avg_return])
|
||||||
|
|
||||||
for ckpt_name, success_rate, avg_return in results:
|
for ckpt_name, success_rate, avg_return in results:
|
||||||
|
|||||||
2
utils.py
2
utils.py
@ -199,7 +199,7 @@ def calibrate_linear_vel(base_action, c=None):
|
|||||||
|
|
||||||
def smooth_base_action(base_action):
|
def smooth_base_action(base_action):
|
||||||
return np.stack([
|
return np.stack([
|
||||||
np.convolve(base_action[:, i], np.ones(20)/20, mode='same') for i in range(base_action.shape[1])
|
np.convolve(base_action[:, i], np.ones(5)/5, mode='same') for i in range(base_action.shape[1])
|
||||||
], axis=-1).astype(np.float32)
|
], axis=-1).astype(np.float32)
|
||||||
|
|
||||||
def preprocess_base_action(base_action):
|
def preprocess_base_action(base_action):
|
||||||
|
|||||||
在新工单中引用
屏蔽一个用户