class_docstr: Re-ranker object which uses a predictor model to rerank candidates given.
  
  This AbstractReranker can be subclassed to use any classifier or ranking model as
  the predictor.
class_docstr_tok: ["Re-ranker","object","which","uses","a","predictor","model","to","rerank","candidates","given",".","This","AbstractReranker","can","be","subclassed","to","use","any","classifier","or","ranking","model","as","the","predictor","."]
docstr: Construct debug logging.
docstr_tok: ["Construct","debug","logging","."]
code: def _construct_debug_logging(
      self,
      observation: Message,
      response_cands: List[str],
      response_cand_scores: torch.Tensor,
      reranker_outputs: List[Message],
      reranked_candidates: List[str],
      rerank_for_class: str,
  ) -> str:
      """
      Construct debug logging.
      """
      s = "-------------\nFull Context:\n"
      full_context = observation["full_text"]
      utterances = full_context.split(self.delimiter)
      count = 0
      for utt in utterances:
          if self.is_context(utt):
              s += utt
          else:
              s += f'{"Human: " if count % 2 == 0 else "Model: "} {utt}\n'
              count += 1
  
      s += f'Label was: {observation["eval_labels"]}\n'
      s += "Before Reranking:\n"
      for i, c in enumerate(response_cands):
          rerank_score = reranker_outputs[i]["sorted_scores"][
              reranker_outputs[i]["text_candidates"].index(
                  rerank_for_class
              )
          ]
          s += f"c: {c}, beam score: {response_cand_scores[i].item()}, rerank score: {rerank_score}\n"
  
      s += "Reranked candidates:\n"
      for c in reranked_candidates:
          s += f"c: {c}\n"
      return s
  
imports: import logging
  import torch
  from abc import ABC, abstractmethod, abstractclassmethod
  from typing import List, Optional, Tuple
  from parlai.agents.transformer.transformer import TransformerGeneratorAgent
  from parlai.core.agents import create_agent_from_model_file, Agent
  from parlai.core.build_data import modelzoo_path
  from parlai.core.message import Message
  from parlai.core.opt import Opt
  from parlai.core.params import ParlaiParser
  from parlai.core.torch_agent import TorchAgent
  from parlai.utils.strings import normalize_reply
  from parlai.utils.torch import argsort
  from parlai.agents.hugging_face.gpt2 import Gpt2Agent
  from projects.msc.agents.long_tga import TransformerVariantAgent
label_desc: Use image node_id 12 for calling the AbstractReranker obj's underlying member method code with example usage: obj._construct_debug_logging(observation, response_cands, response_cand_scores, reranker_outputs, reranked_candidates, rerank_for_class) and returns: s