fix(evaluate): add missing value to video
This commit is contained in:
parent
a8d0b4797a
commit
abf8a3b3e9
1 changed files with 2 additions and 1 deletions
|
|
@ -97,10 +97,10 @@ def record_episode(
|
||||||
data = state.mj_data
|
data = state.mj_data
|
||||||
|
|
||||||
renderer = mujoco.Renderer(model, width=width, height=height)
|
renderer = mujoco.Renderer(model, width=width, height=height)
|
||||||
|
|
||||||
ep_return = 0.0
|
ep_return = 0.0
|
||||||
observations = _get_observations(state)
|
observations = _get_observations(state)
|
||||||
prev_dist = _get_xy_distance_to_target(observations) if observations else None
|
prev_dist = _get_xy_distance_to_target(observations) if observations else None
|
||||||
|
initial_dist = prev_dist
|
||||||
reached_target = _target_reached(state=state)
|
reached_target = _target_reached(state=state)
|
||||||
|
|
||||||
frames = []
|
frames = []
|
||||||
|
|
@ -145,4 +145,5 @@ def record_episode(
|
||||||
length=steps,
|
length=steps,
|
||||||
reached_target=reached_target,
|
reached_target=reached_target,
|
||||||
final_xy_dist=final_dist,
|
final_xy_dist=final_dist,
|
||||||
|
initial_target_distance=initial_dist,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Reference in a new issue