class_docstr: The Slurm Evaluator is a class designed to continuously monitor VISSL pretrainings
  and launch evaluations as checkpoints become available. The method takes a
  config dictionary consisting of the training checkpoint directory, an array of
  benchmarks, and information on how often to evaluate the trainings.
docstr: Get the max number of training iterations for the main SSL training.
docstr_tok: ["Get","the","max","number","of","training","iterations","for","the","main","SSL","training","."]
code: def _max_training_iterations(self):
      """
      Get the max number of training iterations for the main SSL training.
      """
      training_stdout_json_file = os.path.join(
          self.training_checkpoint_dir, "stdout.json"
      )
  
      # If the stdout.json path doesn't exist, return None.
      if not g_pathmgr.exists(training_stdout_json_file):
          return None
  
      with g_pathmgr.open(training_stdout_json_file, "rb") as f:
          # First line of stdout.json must have max_iterations in the first line
          try:
              first_json_line = json.loads(next(f))
              assert (
                  "max_iterations" in first_json_line
              ), "Training must set max_iterations in the stoud.json. See LogLossLrEtaHook."
              return first_json_line["max_iterations"]
          except StopIteration:
              return None
  
imports: import collections
  import json
  import logging
  import os
  import time
  from datetime import datetime
  from pathlib import Path
  from typing import List
  import submitit
  from iopath.common.file_io import g_pathmgr
  from vissl.config.attr_dict import AttrDict
  from vissl.utils.distributed_launcher import launch_distributed_on_slurm
  from vissl.utils.hydra_config import compose_hydra_configuration, convert_to_attrdict
  from vissl.utils.io import load_file, makedir
  from vissl.utils.misc import flatten_dict, retry
label_desc: Use image node_id 3 for calling the BenchmarkSuiteScheduler obj's underlying member method code with example usage: obj._max_training_iterations() and returns: None, first_json_line, None