-
Notifications
You must be signed in to change notification settings - Fork 3.1k
[Trainer] remove redundant memory metrics and set enable as default #8374
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
Conversation
|
Thanks for your contribution! |
paddlenlp/trainer/trainer.py
Outdated
| logs["current_memory_allocated"] = current_memory_allocated / divisor | ||
| logs["current_memory_reserved"] = current_memory_reserved / divisor | ||
| logs["max_memory_allocated"] = max_memory_allocated / divisor | ||
| logs["max_memory_reserved"] = max_memory_reserved / divisor |
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.
PaddleNLP/scripts/distribute/ci_case_dy.sh
Line 454 in 09a0ce7
| mem=`cat $log_dir/workerlog.0 | grep 'global_step: 30' | awk -F 'gpu_max_memory_reserved: ' '{print $2}' | awk -F ',' '{print $1}'` |
这处也对应改了吧,gpu_max_memory_reserved -> max_memory_reserved
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.
已修改
paddlenlp/trainer/trainer.py
Outdated
| max_memory_reserved = core.device_memory_stat_peak_value("Reserved", device_id) | ||
| logs["current_memory_allocated"] = current_memory_allocated / divisor | ||
| logs["current_memory_reserved"] = current_memory_reserved / divisor | ||
| logs["max_memory_allocated"] = max_memory_allocated / divisor |
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.
| logs["max_memory_allocated"] = max_memory_allocated / divisor | |
| logs["max_memory_allocated"] = max_memory_allocated >> 20 |
这个之前是MB单位,建议不要改变了,保持原来写法。用除法的话,是浮点数,还有小数位的问题,建议直接位运算,MB为单位
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.
已修改
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (11.11%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## develop #8374 +/- ##
===========================================
- Coverage 55.36% 54.60% -0.77%
===========================================
Files 614 636 +22
Lines 96016 108827 +12811
===========================================
+ Hits 53164 59428 +6264
- Misses 42852 49399 +6547 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
paddlenlp/trainer/training_args.py
Outdated
| ) | ||
| skip_memory_metrics: bool = field( | ||
| default=True, metadata={"help": "Whether or not to skip adding of memory profiler reports to metrics."} | ||
| default=False, metadata={"help": "Whether or not to skip adding of memory profiler reports to metrics."} |
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.
这个别改了吧,你们需要用,自己打看
ZHUI
left a comment
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
|
This Pull Request is stale because it has been open for 60 days with no activity. 当前Pull Request 60天内无活动,被标记为stale。 |
|
This Pull Request is stale because it has been open for 60 days with no activity. 当前Pull Request 60天内无活动,被标记为stale。 |
|
This Pull Request is stale because it has been open for 60 days with no activity. 当前Pull Request 60天内无活动,被标记为stale。 |
|
Automatically closed by Paddle-bot. |
PR types
Others
PR changes
Others
Description
remove redundant memory metrics and enable memory metrics print as default