docstr: just pass through the skip_director_reranking_vec.
  
  :param input:
      2D [bsz, seqlen] input to the encoder
  :param input_lengths:
      1D [bsz] lengths of each input item
  :param query_vec:
      2D [bsz*n_turns, seqlen] input for the retriever
  :param input_turns_cnt:
      1D [bsz] number of dialogue turns for each input example
  :param skip_retrieval_vec:
      1D [bsz] indicator for whether to skip retrieval.
  :param skip_director_reranking_vec:
      1D [bsz] indicator for whether to skip modifying generator scores.
docstr_tok: ["just","pass","through","the","skip_director_reranking_vec",".",":","param","input",":","2D","[","bsz",",","seqlen","]","input","to","the","encoder",":","param","input_lengths",":","1D","[","bsz","]","lengths","of","each","input","item",":","param","query_vec",":","2D","[","bsz","*","n_turns",",","seqlen","]","input","for","the","retriever",":","param","input_turns_cnt",":","1D","[","bsz","]","number","of","dialogue","turns","for","each","input","example",":","param","skip_retrieval_vec",":","1D","[","bsz","]","indicator","for","whether","to","skip","retrieval",".",":","param","skip_director_reranking_vec",":","1D","[","bsz","]","indicator","for","whether","to","skip","modifying","generator","scores","."]
code: def encoder(
      self,
      input: torch.LongTensor,
      input_lengths: torch.LongTensor,
      query_vec: torch.LongTensor,
      input_turns_cnt: torch.LongTensor,
      skip_retrieval_vec: torch.BoolTensor,
      skip_director_reranking_vec: Optional[torch.BoolTensor] = None,
      positions: Optional[torch.LongTensor] = None,
      segments: Optional[torch.LongTensor] = None,
  ) -> Tuple[
      torch.Tensor,
      torch.BoolTensor,
      Optional[torch.LongTensor],
      Optional[List[List[Document]]],
      Optional[torch.Tensor],
      Optional[torch.BoolTensor],
  ]:
      """
      just pass through the skip_director_reranking_vec.
  
      :param input:
          2D [bsz, seqlen] input to the encoder
      :param input_lengths:
          1D [bsz] lengths of each input item
      :param query_vec:
          2D [bsz*n_turns, seqlen] input for the retriever
      :param input_turns_cnt:
          1D [bsz] number of dialogue turns for each input example
      :param skip_retrieval_vec:
          1D [bsz] indicator for whether to skip retrieval.
      :param skip_director_reranking_vec:
          1D [bsz] indicator for whether to skip modifying generator scores.
      """
      (
          new_out,
          new_mask,
          input_turns_cnt,
          new_top_docs,
          new_top_doc_scores,
      ) = super().encoder(
          input=input,
          input_lengths=input_lengths,
          query_vec=query_vec,
          input_turns_cnt=input_turns_cnt,
          skip_retrieval_vec=skip_retrieval_vec,
          positions=positions,
          segments=segments,
      )
      return (
          new_out,
          new_mask,
          input_turns_cnt,
          new_top_docs,
          new_top_doc_scores,
          skip_director_reranking_vec,
      )
  
imports: import torch
  import torch.nn.functional
  import copy
  from typing import Optional, List, Tuple, Any, Dict, Union
  from parlai.core.opt import Opt
  from parlai.core.params import ParlaiParser
  from parlai.core.torch_agent import Batch
  from parlai.core.message import Message
  from parlai.agents.rag.retrievers import Document
  from parlai.agents.fid.fid import SearchQueryFiDAgent, WizIntGoldDocRetrieverFiDAgent
  import parlai.utils.logging
  from projects.seeker.agents.seeker_modules import ComboFidModel
  from projects.seeker.agents.seeker import ComboFidAgent, SeekerAgent
  from projects.fits.agents.director_bb2 import DirectorFidAgent, DirectorFidModelMixin
label_desc: Use image node_id 1 for calling the DirectorComboFidModel obj's underlying member method code with example usage: obj.encoder(input, input_lengths, query_vec, input_turns_cnt, skip_retrieval_vec, skip_director_reranking_vec, positions, segments) and returns: new_out,  new_mask,  input_turns_cnt,  new_top_docs,  new_top_doc_scores,  skip_director_reranking_vec