dora/server/server.py
def predict(samplerid):
    """
    provides a prediction of the forward model at a set of given query
    parameters

    It expects a list of lists with n elements in the main list
    corresponding to the number of queries and each element has d elements
    corresponding to the number of parameters in the forward model.

    It returns a dict with a predictive mean and and predictive variance entry
    Each are n x n_stacks
    """

    query_loc = fl.request.json
    pred_mean, pred_var = \
        fl.current_app.samplers[int(samplerid)].predict(np.asarray(query_loc))
    response_data = {"predictive_mean": pred_mean.tolist(),
                     "predictive_variance": pred_var.tolist()}
    return response_data, 200

    provides a prediction of the forward model at a set of given query
    parameters

    It expects a list of lists with n elements in the main list
    corresponding to the number of queries and each element has d elements
    corresponding to the number of parameters in the forward model.

    It returns a dict with a predictive mean and and predictive variance entry
    Each are n x n_stacks
    
provides a prediction of the forward model at a set of given query
parameters

It expects a list of lists with n elements in the main list
corresponding to the number of queries and each element has d elements
corresponding to the number of parameters in the forward model.

It returns a dict with a predictive mean and and predictive variance entry
Each are n x n_stacks
provides a prediction of the forward model at a set of given query parameters It expects a list of lists with n elements in the main list corresponding to the number of queries and each element has d elements corresponding to the number of parameters in the forward model . It returns a dict with a predictive mean and and predictive variance entry Each are n x n_stacks
def predict(samplerid):
    query_loc = fl.request.json
    pred_mean, pred_var = \
        fl.current_app.samplers[int(samplerid)].predict(np.asarray(query_loc))
    response_data = {"predictive_mean": pred_mean.tolist(),
                     "predictive_variance": pred_var.tolist()}
    return response_data, 200
def predict ( samplerid ) : query_loc = fl . request . json pred_mean , pred_var = fl . current_app . samplers [ int ( samplerid ) ] . predict ( np . asarray ( query_loc ) ) response_data = { "predictive_mean" : pred_mean . tolist ( ) , "predictive_variance" : pred_var . tolist ( ) } return response_data , 200
provides a prediction of the forward model at a set of given query
parameters
provides a prediction of the forward model at a set of given query parameters
"""
    provides a prediction of the forward model at a set of given query
    parameters

    It expects a list of lists with n elements in the main list
    corresponding to the number of queries and each element has d elements
    corresponding to the number of parameters in the forward model.

    It returns a dict with a predictive mean and and predictive variance entry
    Each are n x n_stacks
    """
samplerid