class_docstr: The worker is responsible for evaluating a single configuration on a single budget at a time.
  Communication to the individual workers goes via the nameserver, management of the worker-pool and job
  scheduling is done by the Dispatcher and jobs are determined by the Master. In distributed systems, each
  cluster-node runs a Worker-instance. To implement your own worker, overwrite the `__init__`- and the `compute`-method.
  The first allows to perform inital computations, e.g. loading the dataset, when the worker is started, while the
  latter is repeatedly called during the optimization and evaluates a given configuration yielding the associated loss.
class_docstr_tok: ["The","worker","is","responsible","for","evaluating","a","single","configuration","on","a","single","budget","at","a","time",".","Communication","to","the","individual","workers","goes","via","the","nameserver",",","management","of","the","worker-pool","and","job","scheduling","is","done","by","the","Dispatcher","and","jobs","are","determined","by","the","Master",".","In","distributed","systems",",","each","cluster-node","runs","a","Worker-instance",".","To","implement","your","own","worker",",","overwrite","the","`","__init__","`","-","and","the","`","compute","`","-method",".","The","first","allows","to","perform","inital","computations",",","e.g",".","loading","the","dataset",",","when","the","worker","is","started",",","while","the","latter","is","repeatedly","called","during","the","optimization","and","evaluates","a","given","configuration","yielding","the","associated","loss","."]
docstr: Method to start the worker.
  
  Parameters
  ----------
          background: bool
                  If set to False (Default). the worker is executed in the current thread.
                  If True, a new daemon thread is created that runs the worker. This is
                  useful in a single worker scenario/when the compute function only simulates
                  work.
docstr_tok: ["Method","to","start","the","worker",".","Parameters","--","--","--","--","--","background",":","bool","If","set","to","False","(","Default",")",".","the","worker","is","executed","in","the","current","thread",".","If","True",",","a","new","daemon","thread","is","created","that","runs","the","worker",".","This","is","useful","in","a","single","worker","scenario\/when","the","compute","function","only","simulates","work","."]
code: def run(self, background=False):
      """
      Method to start the worker.
  
      Parameters
      ----------
              background: bool
                      If set to False (Default). the worker is executed in the current thread.
                      If True, a new daemon thread is created that runs the worker. This is
                      useful in a single worker scenario/when the compute function only simulates
                      work.
      """
      if background:
          self.worker_id += str(threading.get_ident())
          self.thread = threading.Thread(
              target=self._run, name="worker %s thread" % self.worker_id
          )
          self.thread.daemon = True
          self.thread.start()
      else:
          self._run()
  
file_path: auptimizer/src/aup/Proposer/hpbandster/core/worker.py
imports: import time
  import logging
  import pickle
  import os, socket
  import traceback
  import threading
  import Pyro4
label_desc: Use image node_id 3 for calling the Worker obj's underlying member method code with example usage: obj.run(background) without return types