import json


def load_data(filename: str) -> dict:
    """load training results and compute max_score."""
    with open(f"data/{filename}.json", "r") as f:
        training_state = json.load(f)
    max_reached = 0
    training_state['max_scores'] = []
    for i in training_state['scores']:
        max_reached = max(i, max_reached)
        training_state['max_scores'].append(max_reached)
    return training_state