Skip to content

【PaddleNLP No. 5】updates the In-Batch Negative Recall model to support the PIR #10352

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

Merged
merged 1 commit into from
Apr 10, 2025

Conversation

hanlintang
Copy link
Contributor

PR types

Function optimization

PR changes

Models

Description

This PR updates the In-Batch Negative Recall model to support the PIR mechanism.

  1. Modified slm/applications/neural_search/recall/in_batch_negative/README.md to fix commands that could not be executed.
  2. Added slm/applications/neural_search/recall/in_batch_negative/scripts/train.sh to provide a runnable training script.
  3. Updated slm/applications/neural_search/recall/in_batch_negative/deploy/python/predict.py to adapt to the PIR mechanism.
  4. Modified slm/applications/neural_search/recall/in_batch_negative/deploy/python/deploy.sh so that it can be executed from the slm/applications/neural_search/recall/in_batch_negative/ directory, ensuring consistency with other pipelines.

其他问题:

  1. Paddle Serving 部署一节开始,export_to_serving.py调用的import paddle_serving_client.io as serving_io与3.0.0版本paddlepaddle不兼容,报错如下:
aistudio@jupyter-227232-8957468:~/PaddleNLP/slm/applications/neural_search/recall/in_batch_negative$ sh scripts/export_to_serving.sh 
Traceback (most recent call last):
  File "export_to_serving.py", line 17, in <module>
    import paddle_serving_client.io as serving_io
  File "/home/aistudio/.local/lib/python3.8/site-packages/paddle_serving_client/io/__init__.py", line 16, in <module>
    from paddle.fluid import Executor
ModuleNotFoundError: No module named 'paddle.fluid'

无法实现静态模型向Serving格式转换及之后的服务部署。

issue: #9763

Copy link

paddle-bot bot commented Apr 7, 2025

Thanks for your contribution!

@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Apr 8, 2025
@luotao1 luotao1 assigned luotao1 and DrownFish19 and unassigned gongel Apr 8, 2025
@DrownFish19
Copy link
Collaborator

Paddle修改导致PaddleNLP历史写法失效,现在已经修改。等待#10364 合入develop分支后拉取最新分支。

Copy link
Collaborator

@DrownFish19 DrownFish19 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

codecov bot commented Apr 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.28%. Comparing base (e67789d) to head (cff7c56).
Report is 3 commits behind head on develop.

❌ Your project status has failed because the head coverage (49.28%) 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   #10352      +/-   ##
===========================================
- Coverage    49.28%   49.28%   -0.01%     
===========================================
  Files          760      760              
  Lines       124968   124968              
===========================================
- Hits         61595    61594       -1     
- Misses       63373    63374       +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.

@DrownFish19 DrownFish19 merged commit 54c3ec3 into PaddlePaddle:develop Apr 10, 2025
10 of 12 checks passed
@hanlintang hanlintang deleted the neural_search_pir branch April 10, 2025 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants