class_docstr: Override TorchRankerAgent to include label in fixed cands set.
  
  Necessary for certain IR tasks where given candidate set does not contain example
  labels.
class_docstr_tok: ["Override","TorchRankerAgent","to","include","label","in","fixed","cands","set",".","Necessary","for","certain","IR","tasks","where","given","candidate","set","does","not","contain","example","labels","."]
code: def __init__(self, opt, shared=None):
      super().__init__(opt, shared)
      self.add_label_to_fixed_cands = opt.get(
          "add_label_to_fixed_cands"
      )
      if self.add_label_to_fixed_cands:
          self.ignore_bad_candidates = True
  
imports: from typing import Optional
  from parlai.core.params import ParlaiParser
  from parlai.core.opt import Opt
  import torch
  from .transformer import TransformerRankerAgent
  from parlai.core.torch_ranker_agent import TorchRankerAgent
label_desc: Use image node_id 1 to create a new AddLabelFixedCandsTRA object from inherited base classes: TorchRankerAgent with example: obj = AddLabelFixedCandsTRA(opt, shared)