code: def evaluate_accuracy(self, model, data_loader):
      model.eval()
      correct = 0
      with torch.no_grad():
          for x, y in data_loader:
              output = model(x)
              # test_loss += F.nll_loss(output, target, reduction='sum').item() # sum up batch loss
              pred = output.max(1, keepdim=True)[
                  1
              ]  # get the index of the max log-probability
              correct += pred.eq(y.view_as(pred)).sum().item()
      # import pdb; pdb.set_trace()
      accuracy = correct / len(data_loader.sampler)
      return accuracy
  
file_path: auptimizer/src/aup/Proposer/hpbandster/examples/example_5_pytorch_worker.py
imports: import ConfigSpace
  import ConfigSpace.hyperparameters
  from hpbandster.core.worker import Worker
  import logging
label_desc: Use image node_id 3 for calling the PyTorchWorker obj's underlying member method code with example usage: obj.evaluate_accuracy(model, data_loader) and returns: accuracy