def generate_experiment_path_prefix(absolute_specs_path):
    """ Given a relative path to a specs-file, extract the experiment's absolute path prefix. """
    assert absolute_specs_path.endswith('-specs.json') and (absolute_specs_path.count('specs.json') == 1)
    return absolute_specs_path.replace('-specs.json', '')