Plots a success-fail curve from a confidence report stored on disk,
  :param path: string filepath for the stored report.
    (Should be the output of make_confidence_report*.py)
  :param success_name: The name (confidence report key) of the data that
    should be used to measure success rate
  :param fail_names: A list of names (confidence report keys) of the data
    that should be used to measure failure rate.
    *Only one of these keys will be plotted*. Each key will be tried in
    order until one is found in the report. This is to support both the
    output of `make_confidence_report` and `make_confidence_report_bundled`.
  :param label: Optional string. Name to use for this curve in the legend.
  :param is_max_confidence: bool.
    If True, when measuring the failure rate, treat the data as the output
    of a maximum confidence attack procedure.
    This means that the attack is optimal (assuming the underlying optimizer
    is good enough, *which is probably false*, so interpret the plot
    accordingly) for thresholds >= .5 but for lower thresholds the observed
    failure rate is a lower bound on the true worst failure rate and the
    observed coverage is an upper bound (assuming good enough optimization)
    on the true failure rate.
    The plot thus draws the threshold >= .5 portion of the curve with a solid
    line and the upper and lower bounds with a dashed line.
    See https://openreview.net/forum?id=H1g0piA9tQ for details.
    If False, the attack procedure is regarded as an ad hoc way of obtaining
    a loose lower bound, and thus the whole curve is drawn with dashed lines.
  :param linewidth: thickness of the line to draw
  :param plot_upper_bound: include upper bound on error rate in plot

def plot_report_from_path(path, success_name=DEFAULT_SUCCESS_NAME,
                          fail_names=DEFAULT_FAIL_NAMES, label=None,
                          is_max_confidence=True,
                          linewidth=LINEWIDTH,
                          plot_upper_bound=True):
  """
  Plots a success-fail curve from a confidence report stored on disk,
  :param path: string filepath for the stored report.
    (Should be the output of make_confidence_report*.py)
  :param success_name: The name (confidence report key) of the data that
    should be used to measure success rate
  :param fail_names: A list of names (confidence report keys) of the data
    that should be used to measure failure rate.
    *Only one of these keys will be plotted*. Each key will be tried in
    order until one is found in the report. This is to support both the
    output of `make_confidence_report` and `make_confidence_report_bundled`.
  :param label: Optional string. Name to use for this curve in the legend.
  :param is_max_confidence: bool.
    If True, when measuring the failure rate, treat the data as the output
    of a maximum confidence attack procedure.
    This means that the attack is optimal (assuming the underlying optimizer
    is good enough, *which is probably false*, so interpret the plot
    accordingly) for thresholds >= .5 but for lower thresholds the observed
    failure rate is a lower bound on the true worst failure rate and the
    observed coverage is an upper bound (assuming good enough optimization)
    on the true failure rate.
    The plot thus draws the threshold >= .5 portion of the curve with a solid
    line and the upper and lower bounds with a dashed line.
    See https://openreview.net/forum?id=H1g0piA9tQ for details.
    If False, the attack procedure is regarded as an ad hoc way of obtaining
    a loose lower bound, and thus the whole curve is drawn with dashed lines.
  :param linewidth: thickness of the line to draw
  :param plot_upper_bound: include upper bound on error rate in plot
  """
  report = load(path)
  plot_report(report, success_name, fail_names, label, is_max_confidence,
              linewidth, plot_upper_bound)