aws / aws/sagemaker-huggingface-inference-toolkit
Support for return_all_scores in pipeline
- Dominant language
- Python
- Stars
- 270
- Forks
- 60
- PR merge metrics
- No merged PRs in 30d
Description
For `text_classification` pipeline, the parameter `return_all_scores=True` is needed to get all scores of all labels. Could this be integrated into the toolkit? (or potentially for newer version, the parameters is `top_k = n`).
Allowing to pass additional parameters needed for the pipeline would be great.
```
pipe = pipeline("text-classification", model='path/to/mode', tokenizer='path/to/tokenizer', return_all_scores=True)
```
Contributor guide
Research direction
Start at the toolkit's text_classification pipeline entry point and trace how pipeline arguments are handled. Exercise the supplied example with return_all_scores=True, or top_k=n for newer versions, and confirm that all label scores are returned; handling for additional pipeline parameters should also be explicit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- huggingface, python
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100