Skip to content

Conversation

yaqiangsun
Copy link
Contributor

Before submitting

  • Lint code. If there are lint issues, please format the code first.
# Install and register `pre-commit` in the project folder
pip install pre-commit && pre-commit install

# Process previous code files separately
pre-commit run --file XXXX.py
  • Add test cases into tests folder. If there are codecov issues, please add tests cases first.

PR types

Bug fixes

PR changes

APIs

Description

When using Taskflow:

uie = Taskflow("information_extraction", schema=schema,task_path='./checkpoint-xxxx/',position_prob=0.1,max_length=2048)`

The model will produce the wrong result:

{'result': ['技术-安全': [{'text': '安全', 'probability': 0.1034098104269674}],...}]}

This text 安全 does not appear in the sentence. And the start_id is less than 0. This PR keep the start_id meaningful.

Copy link

paddle-bot bot commented May 7, 2025

Thanks for your contribution!

@yaqiangsun yaqiangsun changed the title To make sure the start_id meaningful [Taskflow]To make sure the start_id meaningful May 7, 2025
Copy link

codecov bot commented May 7, 2025

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 48.66%. Comparing base (c7d44f2) to head (464e733).
Report is 107 commits behind head on develop.

Files with missing lines Patch % Lines
paddlenlp/taskflow/utils.py 0.00% 3 Missing ⚠️

❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.
❌ Your project check has failed because the head coverage (48.66%) is below the target coverage (58.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #10547      +/-   ##
===========================================
- Coverage    48.66%   48.66%   -0.01%     
===========================================
  Files          768      768              
  Lines       126955   126956       +1     
===========================================
  Hits         61781    61781              
- Misses       65174    65175       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

github-actions bot commented Jul 8, 2025

This Pull Request is stale because it has been open for 60 days with no activity. 当前Pull Request 60天内无活动,被标记为stale。

@github-actions github-actions bot added the stale label Jul 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants