asyml / asyml/forte

Batcher returns the same Sentence multiple time when connecting two or more predictors in the same pipeline.

Open
#415 0 comments 0 reactions 0 assignees View on GitHub
bug data_aug e/1 priority: high
Dominant language
Python
Stars
253
Forks
59
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
When I use two of my trained models to make predictions, the output of the second predictor sometimes has duplicated items.

**To Reproduce**
Steps to reproduce the behavior:
1. Train two or more NLP models, such as entity mention and entity linking.
2. Build inference pipeline by connecting these NLP models back-to-back, which means they would be applied on the same datapack.
3. Check the output of these modules on each sentence.

**Expected behavior**
For the second or following modules, the output may have duplicated items. If you trace in to batch generation, you will notice it yield the same Sentence for prediction multiple times.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Environment (please complete the following information):**
- OS: [e.g. iOS]
- Version [e.g. 22]
- Python and Package verions: [e.g. Python version, Pytorch version]

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Research direction

No source file or test is named. Start by tracing batch generation in the pipeline when two predictors consume the same datapack, then reproduce the reported case with two NLP models and verify that each Sentence is yielded only once for the second and later predictors.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.