[Dataloader] Fix _DataLoaderIterMultiProcess/_DataLoaderIterSingleProcess has no attribute 'shudown' by HydrogenSulfate · Pull Request #73931 · PaddlePaddle/Paddle

@HydrogenSulfate

PR Category

User Experience

PR Types

Bug fixes

Description

Pcard-75624

  1. 修复_DataLoaderIterMultiProcess/_DataLoaderIterSingleProcess遇到报错问题时,可能会触发提示:has no attribute '_shutdown' attribute,其原因在于_shutdown的定义在触发报错的语句后面,因此将其移动到前面
  2. _init_thread时也可能会失败,因此根据实际的_worker_status数量进行销毁,否则会触发list的 out of range报错

@HydrogenSulfate

@paddle-bot

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@HydrogenSulfate

@codecov-commenter

Codecov Report

Attention: Patch coverage is 50.00000% with 6 lines in your changes missing coverage. Please review.

Please upload report for BASE (develop@673924e). Learn more about missing BASE report.

Files with missing lines Patch % Lines
python/paddle/io/dataloader/dataloader_iter.py 50.00% 6 Missing ⚠️

❌ Your patch status has failed because the patch coverage (50.00%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop   #73931   +/-   ##
==========================================
  Coverage           ?   50.00%           
==========================================
  Files              ?        1           
  Lines              ?       12           
  Branches           ?        0           
==========================================
  Hits               ?        6           
  Misses             ?        6           
  Partials           ?        0           

☔ 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.

SigureMo

Choose a reason for hiding this comment

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

LGTMeow 🐾