-
Notifications
You must be signed in to change notification settings - Fork 169
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
[Enh] add validation for hydra config #769
[Enh] add validation for hydra config #769
Conversation
Thanks for your contribution! |
b325f8d
to
5f4c716
Compare
ppsci/utils/config.py
Outdated
def log_freq_check(cls, v): | ||
if not isinstance(v, int): | ||
raise ValueError( | ||
"'log_freq' should be a int" f", but got {misc.typename(v)}" |
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.
此行修改下,把f 移到行首吧
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.
已修改
ppsci/utils/config.py
Outdated
) | ||
if not isinstance(info.data["wandb_config"], dict): | ||
raise ValueError( | ||
f"'wandb_config' should be a dict when 'use_wandb' is True, " |
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.
删除 f
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
* add validation for hydra config * update unitest for pydantic * fix for OptimizerList * fix
PR types
Function optimization
PR changes
APIs
Describe
内容主要来自 #737 的部分commit,完成 #233 (review) 的TODO