-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Update set_seed in trainer_utils.py #7528
Conversation
Thanks for your contribution! |
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:
Additional details and impacted files@@ Coverage Diff @@
## develop #7528 +/- ##
===========================================
- Coverage 57.92% 57.86% -0.06%
===========================================
Files 579 582 +3
Lines 86390 86492 +102
===========================================
+ Hits 50038 50046 +8
- Misses 36352 36446 +94 ☔ View full report in Codecov by Sentry. |
llm/gpt-3/run_pretrain.py
Outdated
init_dist_env( | ||
training_args.tensor_parallel_degree, | ||
training_args.sharding_parallel_degree, | ||
training_args.pipeline_parallel_degree, | ||
training_args.data_parallel_degree, | ||
training_args.seed, | ||
) |
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.
这个环境已经在 training_args 里面初始化好了。
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_utils.py
Outdated
""" | ||
|
||
# set control in tensor parallel | ||
print("init_dist_env asdfasdfasdf niuliling") |
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.
测试的flag 删除
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.
完成
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
if args.use_hybrid_parallel: | ||
from paddle.distributed.fleet.meta_parallel import get_rng_state_tracker | ||
else: | ||
hcg = fleet.get_hybrid_communicate_group() if hasattr(fleet.fleet, "_hcg") else None |
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.
hasattr(fleet.fleet, "_hcg")
这个属性是初始化分布式了之后才有?
- cpu版本paddle
- gpu版本paddle 跑cpu
- gpu版本跑gpu
2的情况下fleet.fleet._hcg
是否是None。
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.
是的init之后才有hcg 或者init_dist_env之后才有hcg
2的时候不是none, 当未初始化的时候才是none
PR types
Others
PR changes
Others
Description
修复PP分布式策略下 多卡之前seed设置错误的问题