class_docstr: Online Retrieval Predictor for Clips (used by RetriTask).
  TODO: merge this with VisPredictor?
class_docstr_tok: ["Online","Retrieval","Predictor","for","Clips","(","used","by","RetriTask",")",".","TODO",":","merge","this","with","VisPredictor","?"]
code: def __init__(self, config):
      self.pred_dir = os.path.join(
          config.fairseq.checkpoint.save_dir, "retri"
      )
      self.num_cands = config.num_cands
      self.num_video_per_batch = config.dataset.num_video_per_batch
  
imports: import os
  import torch
  import pickle
  import random
  from tqdm import tqdm
  from torch.utils.data import DataLoader
  from torch.utils.data.distributed import DistributedSampler
  from ..processors import ShardedHow2MetaProcessor, ShardedVideoProcessor, ShardedTextProcessor, VariedLenAligner
  from ..datasets import MMDataset
  from .task import Task
  from ..modules import vectorpool
  from ..evaluators.predictor import Predictor
  from ..utils import set_seed, get_local_rank, get_world_size
label_desc: Use image node_id 1 to create a new VideoRetriPredictor object from inherited base classes: Predictor with example: obj = VideoRetriPredictor(config)