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: The function you have to overload implementing your computation.
  
  Parameters
  ----------
  config_id: tuple
          a triplet of ints that uniquely identifies a configuration. the convention is
          id = (iteration, budget index, running index) with the following meaning:
          - iteration: the iteration of the optimization algorithms. E.g, for Hyperband that is one round of Successive Halving
          - budget index: the budget (of the current iteration) for which this configuration was sampled by the optimizer. This is only nonzero if the majority of the runs fail and Hyperband resamples to fill empty slots, or you use a more 'advanced' optimizer.
          - running index: this is simply an int >= 0 that sort the configs into the order they where sampled, i.e. (x,x,0) was sampled before (x,x,1).
  config: dict
          the actual configuration to be evaluated.
  budget: float
          the budget for the evaluation
  working_directory: str
          a name of a directory that is unique to this configuration. Use this to store intermediate results on lower budgets that can be reused later for a larger budget (for iterative algorithms, for example).
  Returns
  -------
  dict:
          needs to return a dictionary with two mandatory entries:
                  - 'loss': a numerical value that is MINIMIZED
                  - 'info': This can be pretty much any build in python type, e.g. a dict with lists as value. Due to Pyro4 handling the remote function calls, 3rd party types like numpy arrays are not supported!
docstr_tok: ["The","function","you","have","to","overload","implementing","your","computation",".","Parameters","--","--","--","--","--","config_id",":","tuple","a","triplet","of","ints","that","uniquely","identifies","a","configuration",".","the","convention","is","id","=","(","iteration",",","budget","index",",","running","index",")","with","the","following","meaning",":","-","iteration",":","the","iteration","of","the","optimization","algorithms",".","E.g",",","for","Hyperband","that","is","one","round","of","Successive","Halving","-","budget","index",":","the","budget","(","of","the","current","iteration",")","for","which","this","configuration","was","sampled","by","the","optimizer",".","This","is","only","nonzero","if","the","majority","of","the","runs","fail","and","Hyperband","resamples","to","fill","empty","slots",",","or","you","use","a","more","'advanced","'","optimizer",".","-","running","index",":","this","is","simply","an","int",">","=","0","that","sort","the","configs","into","the","order","they","where","sampled",",","i.e",".","(","x",",","x,0",")","was","sampled","before","(","x",",","x,1",")",".","config",":","dict","the","actual","configuration","to","be","evaluated",".","budget",":","float","the","budget","for","the","evaluation","working_directory",":","str","a","name","of","a","directory","that","is","unique","to","this","configuration",".","Use","this","to","store","intermediate","results","on","lower","budgets","that","can","be","reused","later","for","a","larger","budget","(","for","iterative","algorithms",",","for","example",")",".","Returns","--","--","--","-","dict",":","needs","to","return","a","dictionary","with","two","mandatory","entries",":","-","'loss","'",":","a","numerical","value","that","is","MINIMIZED","-","'info","'",":","This","can","be","pretty","much","any","build","in","python","type",",","e.g",".","a","dict","with","lists","as","value",".","Due","to","Pyro4","handling","the","remote","function","calls",",","3rd","party","types","like","numpy","arrays","are","not","supported","!"]
code: def compute(self, config_id, config, budget, working_directory):
      """The function you have to overload implementing your computation.
  
      Parameters
      ----------
      config_id: tuple
              a triplet of ints that uniquely identifies a configuration. the convention is
              id = (iteration, budget index, running index) with the following meaning:
              - iteration: the iteration of the optimization algorithms. E.g, for Hyperband that is one round of Successive Halving
              - budget index: the budget (of the current iteration) for which this configuration was sampled by the optimizer. This is only nonzero if the majority of the runs fail and Hyperband resamples to fill empty slots, or you use a more 'advanced' optimizer.
              - running index: this is simply an int >= 0 that sort the configs into the order they where sampled, i.e. (x,x,0) was sampled before (x,x,1).
      config: dict
              the actual configuration to be evaluated.
      budget: float
              the budget for the evaluation
      working_directory: str
              a name of a directory that is unique to this configuration. Use this to store intermediate results on lower budgets that can be reused later for a larger budget (for iterative algorithms, for example).
      Returns
      -------
      dict:
              needs to return a dictionary with two mandatory entries:
                      - 'loss': a numerical value that is MINIMIZED
                      - 'info': This can be pretty much any build in python type, e.g. a dict with lists as value. Due to Pyro4 handling the remote function calls, 3rd party types like numpy arrays are not supported!
      """
  
      raise NotImplementedError(
          "Subclass hpbandster.distributed.worker and overwrite the compute method in your worker script"
      )
  
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 5 for calling the Worker obj's underlying member method code with example usage: obj.compute(config_id, config, budget, working_directory) without return types