class_docstr: Basic tests for some simple functionality.
class_docstr_tok: ["Basic","tests","for","some","simple","functionality","."]
code: def test_compute_ppl_scores(self, mock_perplexity):
      mock_perplexity.return_value = [(2, 2), (20, 2)]
      score_types = LANGUAGE_MODEL_SCORES
      desired_scores = {
          PPL_CHAIN: 0.5,
          PPL_STEP: 0.09,
          PPL_STEP_MAX: 0.05,
      }
      scores = self.reasoning_evaluator.compute_ppl_scores(
          self.chain, score_types
      )
      for model in LANGUAGE_MODEL_SCORES:
          self.assertTrue(model in scores)
          self.assertAlmostEqual(
              desired_scores[model], scores[model], places=2
          )
  
file_path: ParlAI/tests/nightly/cpu/test_roscoe.py
imports: import unittest
  from unittest.mock import patch
  import numpy
label_desc: Use image node_id 6 for calling the TestEvaluator obj's underlying member method code with example usage: obj.test_compute_ppl_scores(mock_perplexity) without return types