(self, config, budget, **kwargs)
return({
                    'loss': float(res),  # this is the a mandatory field to run hyperband
                    'info': res  # can be used for any user-defined information - also mandatory
                })
Simple example for a compute function
        The loss is just a the config + some noise (that decreases with the budget)

        For dramatization, the function can sleep for a given interval to emphasizes
        the speed ups achievable with parallel workers.

        Args:
            config: dictionary containing the sampled configurations by the optimizer
            budget: (float) amount of time/epochs/etc. the model can use to train

        Returns:
            dictionary with mandatory fields:
                'loss' (scalar)
                'info' (dict)
Simple example for a compute function
        The loss is just a the config + some noise (that decreases with the budget)
Simple example for a compute function The loss is just a the config + some noise ( that decreases with the budget )
def compute(self, config, budget, **kwargs):
        """
        Simple example for a compute function
        The loss is just a the config + some noise (that decreases with the budget)

        For dramatization, the function can sleep for a given interval to emphasizes
        the speed ups achievable with parallel workers.

        Args:
            config: dictionary containing the sampled configurations by the optimizer
            budget: (float) amount of time/epochs/etc. the model can use to train

        Returns:
            dictionary with mandatory fields:
                'loss' (scalar)
                'info' (dict)
        """

        res = numpy.clip(config['x'] + numpy.random.randn()/budget, config['x']/2, 1.5*config['x'])
        time.sleep(self.sleep_interval)

        return({
                    'loss': float(res),  # this is the a mandatory field to run hyperband
                    'info': res  # can be used for any user-defined information - also mandatory
                })
def compute ( self , config , budget , * * kwargs ) : res = numpy . clip ( config [ 'x' ] + numpy . random . randn ( ) / budget , config [ 'x' ] / 2 , 1.5 * config [ 'x' ] ) time . sleep ( self . sleep_interval ) return ( { 'loss' : float ( res ) , # this is the a mandatory field to run hyperband 'info' : res # can be used for any user-defined information - also mandatory } )