class_docstr: Wrapper for a DropoutPoly agent.
  
  Provides interface to RagModel as query/document encoder (separate), and provides
  interface to retrievers as a full poly-encoder.
class_docstr_tok: ["Wrapper","for","a","DropoutPoly","agent",".","Provides","interface","to","RagModel","as","query\/document","encoder","(","separate",")",",","and","provides","interface","to","retrievers","as","a","full","poly-encoder","."]
code: def embedding_size(self) -> int:
      model = (
          self.model.module
          if hasattr(self.model, "module")
          else self.model
      )
      return model.encoder_ctxt.embedding_size
  
file_path: ParlAI/parlai/agents/rag/polyfaiss.py
imports: import torch
  import torch.cuda
  import torch.nn
  from typing import Tuple
  from parlai.agents.transformer.polyencoder import PolyEncoderModule
  from parlai.core.agents import create_agent
  from parlai.core.build_data import modelzoo_path
  from parlai.core.dict import DictionaryAgent
  from parlai.core.opt import Opt
  import parlai.utils.logging
  from parlai.agents.transformer.dropout_poly import DropoutPolyAgent, reduce_ctxt
  from parlai.agents.rag.args import POLYENCODER_OPT_KEYS, TRANSFORMER_RANKER_BASE_OPT
label_desc: Use image node_id 4 for calling the RagDropoutPolyWrapper obj's underlying member method code with example usage: obj.embedding_size() and returns: model