class_docstr: Create Resource to run jobs.
  
  :param connector: Connector to database
  :type connector: AbstractConnector
code: def __init__(self, connector, n_parallel, *args, **kwargs):
      self.connector = connector
      self.jobs = dict()
  
      warnings.filterwarnings("ignore")
  
      self.curr_global_iteration = 0
      self.maximize = kwargs.get("maximize", True)
      self.stopped_jobs = None
      self.stopped_jobs_lock = threading.Lock()
      self.n_parallel = n_parallel
      self.eid = kwargs.get("eid", None)
      self.result_labels = kwargs.get("multi_res_labels", None)
  
      self.track_intermediate_results = kwargs.get(
          "track_intermediate_results", False
      )
      self.interm_job_res = None
      if self.track_intermediate_results:
          self.interm_job_res = dict()
  
      # variables for early stop impl
      if "early_stop" in kwargs:
          self.policy = kwargs["early_stop"]["aup_policy"]
          self.policy_steps = kwargs["early_stop"]["aup_policy_steps"]
          self.warmup = kwargs["early_stop"].get("warmup", 0)
          self.bandit_factor = kwargs["early_stop"].get(
              "bandit_factor", 0.5
          )
          self.truncation_percentage = kwargs["early_stop"].get(
              "truncation_percentage", 0.3
          )
          self.curve_fitting_threshold = kwargs["early_stop"].get(
              "curve_fitting_threshold", 0.95
          )
          self.curve_fitting_max_iters = kwargs["early_stop"].get(
              "curve_fitting_max_iters", None
          )
          self.curve_fitting_timeout = kwargs["early_stop"].get(
              "curve_fitting_timeout", 60
          )
          self.job_checked = dict()
          self.early_stop_daemon_finished = False
          self.stopped_jobs = set()
          if (
              self.policy == "curve_fitting"
              and self.curve_fitting_max_iters is None
          ):
              raise ValueError(
                  'Curve fitting policy requires argument "curve_fitting_max_iters" representing '
                  + "the total number of intermediate results that the script will provide."
              )
          self.early_stop_daemon = threading.Thread(
              target=AbstractResourceManager.early_stop_daemon_fun,
              args=(self,),
              daemon=True,
          )
          self.early_stop_daemon.start()
      else:
          self.warmup = None
          self.policy = None
          self.policy_steps = 0
          self.job_checked = dict()
          self.early_stop_daemon_finished = True
          self.early_stop_daemon = None
          self.stopped_jobs = None
  
imports: import abc
  import copy
  import importlib
  import logging
  import random
  import threading
  import time
  import numpy
  import math
  import warnings
  from ...utils import DEFAULT_AUPTIMIZER_PATH
  from .utils.curve_fitting import CurveModel
label_desc: Use image node_id 1 to create a new AbstractResourceManager object from inherited base classes: ABC with example: obj = AbstractResourceManager(connector, n_parallel)