1
Fork 0

fix(evaluate): add missing value to video

This commit is contained in:
Tibo De Peuter 2026-05-12 19:15:44 +02:00
parent a8d0b4797a
commit abf8a3b3e9
Signed by: tdpeuter
SSH key fingerprint: SHA256:u/h/LVoqKF1Iz02uOyxe6hcjmoZASCGV2HM0TG9ZMoU

View file

@ -97,10 +97,10 @@ def record_episode(
data = state.mj_data
renderer = mujoco.Renderer(model, width=width, height=height)
ep_return = 0.0
observations = _get_observations(state)
prev_dist = _get_xy_distance_to_target(observations) if observations else None
initial_dist = prev_dist
reached_target = _target_reached(state=state)
frames = []
@ -145,4 +145,5 @@ def record_episode(
length=steps,
reached_target=reached_target,
final_xy_dist=final_dist,
initial_target_distance=initial_dist,
)