Skip to content
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

[Enhancement] Refine User Scripts #2849

Merged
merged 15 commits into from
Dec 29, 2022

Conversation

juncaipeng
Copy link
Collaborator

PR types

Others

PR changes

Others

Description

  • Refine the code in user scripts

@Harryoung Harryoung closed this Dec 15, 2022
@Harryoung Harryoung reopened this Dec 15, 2022
@Bobholamovic Bobholamovic self-requested a review December 15, 2022 07:19
tmp_dic = dic
for subkey in key_list[:-1]:
tmp_dic.setdefault(subkey, dict())
assert subkey in tmp_dic, "Can not update {}, because it is not in config.".format(
Copy link
Collaborator

Choose a reason for hiding this comment

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

不允许创建新的key了吗?会不会存在默认参数原先不存在于yaml而需要传入的情况呢?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

防止设置错误吧

Copy link
Member

@Bobholamovic Bobholamovic left a comment

Choose a reason for hiding this comment

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

我给这个分支提了个 PR,实现了一些我的想法,辛苦看看:
juncaipeng#1

@juncaipeng @wuyefeilin

Bobholamovic
Bobholamovic previously approved these changes Dec 26, 2022
Copy link
Member

@Bobholamovic Bobholamovic left a comment

Choose a reason for hiding this comment

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

LGTM.

@juncaipeng juncaipeng merged commit c0d932e into PaddlePaddle:develop Dec 29, 2022
@juncaipeng juncaipeng deleted the refine_user_scripts_2 branch December 29, 2022 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants