dora/server/server.py
def retrieve_settings(samplerid):
    """
    provides lists of the settings used by the sampler.
    """
    lower = fl.current_app.samplers[int(samplerid)].lower.tolist()
    upper = fl.current_app.samplers[int(samplerid)].upper.tolist()

    # n_stacks = fl.current_app.samplers[int(samplerid)].n_stacks

    mean = list(fl.current_app.samplers[int(samplerid)].y_mean)
    # trained_flag = fl.current_app.samplers[int(samplerid)].trained_flag

    # TODO add ability to retrieve full state
    # hyper_params = fl.current_app.samplers[int(samplerid)].hyper_params
    # regressors = [reg.tolist() for reg in
    # fl.current_app.samplers[int(samplerid)].regressors] acq_func =
    # [y.tolist() for y in fl.current_app.samplers[int(samplerid)].acq_func]
    # explore_factor = [y.tolist() for y in
    # fl.current_app.samplers[int(samplerid)].explore_factor]
    #
    # virtualIndices = fl.current_app.samplers[int(samplerid)].virtual_flag
    # real_id = [not i for i in virtualIndices]
    #
    # real_X = [x for x, real in zip(X, real_id) if real is True]
    # real_y = [y for y, real in zip(y, real_id) if real is True]
    #
    # virt_X = [x for x, real in zip(X, real_id) if real is False]
    # virt_y = [y for y, real in zip(y, real_id) if real is False]

    response_data = {"lower": lower, "upper": upper,
                     "mean": mean}
    # , "trained_flag": trained_flag}
    #'n_stacks': n_stacks,
    return response_data, 200

    provides lists of the settings used by the sampler.
    
provides lists of the settings used by the sampler.
provides lists of the settings used by the sampler .
def retrieve_settings(samplerid):
    lower = fl.current_app.samplers[int(samplerid)].lower.tolist()
    upper = fl.current_app.samplers[int(samplerid)].upper.tolist()
    mean = list(fl.current_app.samplers[int(samplerid)].y_mean)
     virtualIndices = fl.current_app.samplers[int(samplerid)].virtual_flag
     real_id = [not i for i in virtualIndices]
     real_X = [x for x, real in zip(X, real_id) if real is True]
     real_y = [y for y, real in zip(y, real_id) if real is True]
     virt_X = [x for x, real in zip(X, real_id) if real is False]
     virt_y = [y for y, real in zip(y, real_id) if real is False]
    response_data = {"lower": lower, "upper": upper,
                     "mean": mean}
     , "trained_flag": trained_flag}
    'n_stacks': n_stacks,
    return response_data, 200
def retrieve_settings ( samplerid ) : lower = fl . current_app . samplers [ int ( samplerid ) ] . lower . tolist ( ) upper = fl . current_app . samplers [ int ( samplerid ) ] . upper . tolist ( ) mean = list ( fl . current_app . samplers [ int ( samplerid ) ] . y_mean ) response_data = { "lower" : lower , "upper" : upper , "mean" : mean } return response_data , 200
provides lists of the settings used by the sampler.
provides lists of the settings used by the sampler .
"""
    provides lists of the settings used by the sampler.
    """ # n_stacks = fl.current_app.samplers[int(samplerid)].n_stacks # trained_flag = fl.current_app.samplers[int(samplerid)].trained_flag # TODO add ability to retrieve full state # hyper_params = fl.current_app.samplers[int(samplerid)].hyper_params # regressors = [reg.tolist() for reg in # fl.current_app.samplers[int(samplerid)].regressors] acq_func = # [y.tolist() for y in fl.current_app.samplers[int(samplerid)].acq_func] # explore_factor = [y.tolist() for y in # fl.current_app.samplers[int(samplerid)].explore_factor] # # virtualIndices = fl.current_app.samplers[int(samplerid)].virtual_flag # real_id = [not i for i in virtualIndices] # # real_X = [x for x, real in zip(X, real_id) if real is True] # real_y = [y for y, real in zip(y, real_id) if real is True] # # virt_X = [x for x, real in zip(X, real_id) if real is False] # virt_y = [y for y, real in zip(y, real_id) if real is False] # , "trained_flag": trained_flag} #'n_stacks': n_stacks,
samplerid