Documentation claims that `label_mapping` is an accepted input to `TokenClassificationEvaluator.compute()`; it is not

Open Beginner friendly
#545 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
78/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Quiet
Tech stack
python
Domain
documentation

Research direction

Start with docs/source/base_evaluator.mdx at the linked line and compare it with src/evaluate/evaluator/token_classification.py and the TextClassificationEvaluator documentation. Remove the unsupported label_mapping claim from the token-classification documentation, then check the rendered documentation or documentation checks to confirm the parameter is no longer listed.

Written by the indexing model from the issue text.

Description

This line in the documentation states that label_mapping is an accepted parameter of TokenClassificationEvaluator.compute(), when it in fact is not.

I suspect this line was absent-mindedly copied over from the TextClassificationEvaluator documentation (that class's compute() method actually does accept this parameter).

In my opinion this would be a useful feature to implement (easily allowing users to evaluate models on datasets that don't use exactly the same labels), but at the very least this line should be removed from the documentation as long as the method doesn't support this parameter.

Dominant language
Python
Stars
2.5k
Forks
343
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from huggingface/evaluate

All issues in huggingface/evaluate

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.