-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Codecov ReportAttention: Patch coverage is
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. |
@@ -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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果这里超时,会发生错误。有风险。
PR types
Bug fixes
PR changes
Others
Description
修复开启Flag_dataloader_use_file_descriptor,导致test_predictor.py hang的问题