Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding top_k argument to text-classification pipeline. #17606

Merged
merged 4 commits into from
Jun 9, 2022

Commits on Jun 8, 2022

  1. Adding top_k and sort arguments to text-classification pipeline.

    - Deprecate `return_all_scores` as `top_k` is more uniform with other
      pipelines, and a superset of what `return_all_scores` can do.
      BC is maintained though.
      `return_all_scores=True` -> `top_k=None`
      `return_all_scores=False` -> `top_k=1`
    
    - Using `top_k` will imply sorting the results, but using no argument
      will keep the results unsorted for backward compatibility.
    Narsil committed Jun 8, 2022
    Configuration menu
    Copy the full SHA
    fe7c62b View commit details
    Browse the repository at this point in the history
  2. Remove sort.

    Narsil committed Jun 8, 2022
    Configuration menu
    Copy the full SHA
    96f3df4 View commit details
    Browse the repository at this point in the history
  3. Fixing the test.

    Narsil committed Jun 8, 2022
    Configuration menu
    Copy the full SHA
    fb69da1 View commit details
    Browse the repository at this point in the history
  4. Remove bad doc.

    Narsil committed Jun 8, 2022
    Configuration menu
    Copy the full SHA
    62031d5 View commit details
    Browse the repository at this point in the history