protomotions.agents.evaluators.mimic_evaluator module#

class protomotions.agents.evaluators.mimic_evaluator.MimicEpisodeContext(motion_ids, frame_limits)[source]#

Bases: object

Per-episode-batch state for mimic evaluation.

motion_ids: MockTensor#
frame_limits: MockTensor#
__init__(motion_ids, frame_limits)#
class protomotions.agents.evaluators.mimic_evaluator.MimicEvaluator(agent, fabric, config)[source]#

Bases: BaseEvaluator

Evaluator for Mimic agent’s motion tracking performance.

__init__(agent, fabric, config)[source]#

Initialize the evaluator.

Parameters:
  • agent (Any) – The agent to evaluate

  • fabric (Any) – Lightning Fabric instance for distributed training

property motion_lib: MotionLib#

Motion library (from agent).

property motion_manager: MimicMotionManager#

Motion manager (from env).

initialize_eval()[source]#

Initialize evaluation tracking and cache env state for restoration.

evaluate_episode(env_ids, max_steps)[source]#

Run a single episode batch, optionally with EMA action smoothing.

When eval_action_ema_alpha is set, actions are low-pass filtered to simulate deployment conditions. Motions that fail under EMA get higher sampling weight, creating curriculum pressure toward smooth policies.

run_evaluation()[source]#

Run evaluation across multiple motions.

process_eval_results()[source]#

Process results and update motion sampling weights.

cleanup_after_evaluation()[source]#

Restore env and motion manager state after evaluation.