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

fix hang when Flag_dataloader_use_file_descriptor=True #9080

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

deepllz
Copy link
Contributor

@deepllz deepllz commented Sep 4, 2024

PR types

Bug fixes

PR changes

Others

Description

修复开启Flag_dataloader_use_file_descriptor,导致test_predictor.py hang的问题

Copy link
Contributor

@SylarTiaNII SylarTiaNII 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
Collaborator

@gongweibao gongweibao 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 Sep 4, 2024

Codecov Report

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

Project coverage is 53.50%. Comparing base (fbbc0a2) to head (85f1edf).
Report is 3 commits behind head on develop.

Files with missing lines Patch % Lines
paddlenlp/utils/llm_utils.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #9080      +/-   ##
===========================================
+ Coverage    53.44%   53.50%   +0.06%     
===========================================
  Files          652      652              
  Lines       105187   105188       +1     
===========================================
+ Hits         56214    56281      +67     
+ Misses       48973    48907      -66     

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

@ZHUI ZHUI merged commit 951e3d4 into PaddlePaddle:develop Sep 5, 2024
9 of 12 checks passed
ckl117 pushed a commit to ckl117/PaddleNLP that referenced this pull request Sep 9, 2024
Mangodadada pushed a commit to Mangodadada/PaddleNLP that referenced this pull request Sep 10, 2024
@@ -750,14 +750,14 @@ def get_model_max_position_embeddings(config: PretrainedConfig) -> Optional[int]
return None


def read_res(model_name_or_path: str, tensor_queue: mp.Queue, result_queue: mp.Queue):
def read_res(model_name_or_path: str, tensor_queue: mp.Queue, result_queue: mp.Queue, done_event: mp.Event):
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path)

paddle.device.set_device("cpu")
paddle.disable_static()
outputs = []
output_tensor = tensor_queue.get(timeout=1)
Copy link
Collaborator

Choose a reason for hiding this comment

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

如果这里超时,会发生错误。有风险。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants