def fname_to_pipname(fname):
    """
    Converts a graph filename (assuming it's a .json file) to its "pipeline"
    name (the basename without the extension).
    """
    fname = fname.split('/')[-1]
    if fname.endswith('.json'):
        fname = fname[:-5]
    return fname
