Skip to content

[CI] Doc test is failing #2850

@vfdev-5

Description

@vfdev-5

We have somehow doctest ci job failing right now. The failure happens with the following code snippet from our docs:

 **********************************************************************
File "../../ignite/contrib/metrics/precision_recall_curve.py", line ?, in default
Failed example:
    y_pred = torch.tensor([0.0474, 0.5987, 0.7109, 0.9997])
    y_true = torch.tensor([0, 0, 1, 1])
    prec_recall_curve = PrecisionRecallCurve()
    prec_recall_curve.attach(default_evaluator, 'prec_recall_curve')
    state = default_evaluator.run([[y_pred, y_true]])

    print("Precision", [round(i, 4) for i in state.metrics['prec_recall_curve'][0].tolist()])
    print("Recall", [round(i, 4) for i in state.metrics['prec_recall_curve'][1].tolist()])
    print("Thresholds", [round(i, 4) for i in state.metrics['prec_recall_curve'][2].tolist()])
Expected:
    Precision [1.0, 1.0, 1.0]
    Recall [1.0, 0.5, 0.0]
    Thresholds [0.7109, 0.9997]
Got:
    Precision [0.5, 0.6667, 1.0, 1.0, 1.0]
    Recall [1.0, 1.0, 1.0, 0.5, 0.0]
    Thresholds [0.0474, 0.5987, 0.7109, 0.9997]

How to help with this issue

You need to do some detective work:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions