ValueError when passing confident_joint to rank_classes_by_label_quality
Hey team,
While running some dataset health audits using precomputed confident joints, I ran into an unexpected ValueError when calling rank_classes_by_label_quality(confident_joint=cj) and health_summary(confident_joint=cj) without explicitly passing labels.
According to the docstrings, passing confident_joint as a standalone parameter is a supported input mode, but currently it crashes with: ValueError: Error: num_examples is None. You must either provide confident_joint, or provide both num_example and joint as input parameters.
Looking at cleanlab/dataset.py lines 86 and 424, _get_num_examples is being called with only labels=labels, leaving confident_joint unset. When labels is None, _get_num_examples receives None for both arguments and raises the error even though confident_joint was provided.
I've tested a clean fix locally by forwarding confident_joint to _get_num_examples along with regression tests, and I'll open a PR right away.
Source: cleanlab/cleanlab