class_docstr: Helper class which performs validation of all submissions.
docstr: Initializes SubmissionValidator.
  
  Args:
    source_dir: source Google Cloud Storage directory with all submissions
    target_dir: target Google Cloud Storage directory where to copy
      submissions
    temp_dir: local temporary directory
    do_copy: if True then validate and copy submissions, if False then only
      validate
    use_gpu: if True then use GPU for validation, otherwise use CPU
    containers_file: optional name of the local text file where list of
      Docker containes of all submissions will be saved.
docstr_tok: ["Initializes","SubmissionValidator",".","Args",":","source_dir",":","source","Google","Cloud","Storage","directory","with","all","submissions","target_dir",":","target","Google","Cloud","Storage","directory","where","to","copy","submissions","temp_dir",":","local","temporary","directory","do_copy",":","if","True","then","validate","and","copy","submissions",",","if","False","then","only","validate","use_gpu",":","if","True","then","use","GPU","for","validation",",","otherwise","use","CPU","containers_file",":","optional","name","of","the","local","text","file","where","list","of","Docker","containes","of","all","submissions","will","be","saved","."]
code: def __init__(
      self,
      source_dir,
      target_dir,
      temp_dir,
      do_copy,
      use_gpu,
      containers_file=None,
  ):
      """Initializes SubmissionValidator.
  
      Args:
        source_dir: source Google Cloud Storage directory with all submissions
        target_dir: target Google Cloud Storage directory where to copy
          submissions
        temp_dir: local temporary directory
        do_copy: if True then validate and copy submissions, if False then only
          validate
        use_gpu: if True then use GPU for validation, otherwise use CPU
        containers_file: optional name of the local text file where list of
          Docker containes of all submissions will be saved.
      """
      self.source_dir = source_dir
      self.target_dir = target_dir
      self.do_copy = do_copy
      self.containers_file = containers_file
      self.list_of_containers = set()
      self.local_id_to_path_mapping_file = os.path.join(
          temp_dir, "id_to_path_mapping.csv"
      )
      self.validate_dir = os.path.join(temp_dir, "validate")
      self.base_validator = validate_submission_lib.SubmissionValidator(
          self.validate_dir, use_gpu
      )
      self.stats = ValidationStats()
      self.download_dir = os.path.join(temp_dir, "download")
      self.cur_submission_idx = 0
      self.id_to_path_mapping = {}
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import argparse
  import csv
  import logging
  import os
  import random
  import shutil
  import subprocess
  import tempfile
  from six import iteritems
  import validate_submission_lib
label_desc: Use image node_id 1 to create a new SubmissionValidator object from inherited base classes: object with example: obj = SubmissionValidator(source_dir, target_dir, temp_dir, do_copy, use_gpu, containers_file)