BCEvaluator

class maze.train.trainers.imitation.bc_evaluator.BCEvaluator(loss: maze.train.trainers.imitation.bc_loss.BCLoss, model_selection: Optional[maze.train.trainers.common.model_selection.model_selection_base.ModelSelectionBase], data_loader: torch.utils.data.DataLoader)

Evaluates a given policy on validation data.

Parameters
  • data_loader – The data used for evaluation.

  • loss – Loss function to be used.

  • model_selection – Model selection interface that will be notified of the recorded rewards.

evaluate(policy: maze.core.agent.torch_policy.TorchPolicy)None

Evaluate given policy (results are stored in stat logs) and dump the model if the reward improved.

Parameters

policy – Policy to evaluate