import pickle


def read_results(path):
    """
    read the results written thanks to write_results in path

    Parameters
    ----------
    path : string
        Absolute path.

    Returns
    -------
    param : dictionnary
        dictionnary of the given parameters for the runs
    results : dictionnary
        contains the datas relatives to the runs. For instance,
        results["run0"]["F"] contains the pareto front of the first run.
    """
    fichier = open(path, "rb")
    param = pickle.load(fichier)
    results = pickle.load(fichier)
    fichier.close()
    return param, results