-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 seed #2744
base: develop
Are you sure you want to change the base?
fix seed #2744
Conversation
Thanks for your contribution! |
fix #2743 |
@@ -63,7 +63,7 @@ def __init__(self, config, mode="train"): | |||
|
|||
# set seed | |||
seed = self.config["Global"].get("seed", False) |
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.
这里的get直接返回None会不会好点。
seed = self.config["Global"].get("seed", None)
if seed is not 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.
"The random seed cannot be None in a distributed environment. Global.seed has been set to 42 by default"
不太理解这句话。分布式对随机种子有要求的地方,是不是只有distributed sampler。
fix seed