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

[CPU-PSLIB] Add clearer error log when sparse key name is not int type, test=develop #34173

Merged
merged 4 commits into from
Jul 16, 2021

Conversation

WorgenZhang
Copy link
Contributor

@WorgenZhang WorgenZhang commented Jul 15, 2021

PR types

Function optimization

PR changes

Others

Describe

问题描述:
想在保存的sparse embedding中加上slot_name

关键配置:
config_fleet.py中config['dump_slot'] = True
network.py中sparse特征fluid.layers.data的name设置为非Int类型
dataset_generator.py中sparse特征的name设置为非Int类型

报错信息:
image

修改说明:
上面报错十分不明显,使用者完全无法根据上面报错进行排查,更无法定位到是因为开启了dump_slot,且sparse特证名不为int导致的;因此,在该报错处增加更明显的报错信息,以方便使用者定位问题

修改后报错日志:
image

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

try {
slot = boost::lexical_cast<int>(sparse_key_names[i]);
} catch (boost::bad_lexical_cast const& e) {
std::cout << "Error: " << e.what() << std::endl;
Copy link
Contributor

Choose a reason for hiding this comment

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

use VLOG

yaoxuefeng6
yaoxuefeng6 previously approved these changes Jul 15, 2021
Copy link
Contributor

@yaoxuefeng6 yaoxuefeng6 left a comment

Choose a reason for hiding this comment

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

LGTM

@yaoxuefeng6 yaoxuefeng6 merged commit 661f409 into PaddlePaddle:develop Jul 16, 2021
WorgenZhang added a commit to WorgenZhang/Paddle that referenced this pull request Jul 16, 2021
WorgenZhang added a commit to WorgenZhang/Paddle that referenced this pull request Jul 16, 2021
fuyinno4 pushed a commit that referenced this pull request Jul 16, 2021
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.

2 participants