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] Fix bug for consistency insepection of op's embedding name and sparse table name in config_fleet.py #34441

Merged
merged 1 commit into from
Jul 28, 2021

Conversation

WorgenZhang
Copy link
Contributor

PR types

Bug fixes

PR changes

Others

Describe

问题描述:

  • 目前optimizer_factory.py支持四种embedding_types: self.supported_embedding_types = ["lookup_table", "pull_sparse", "pull_sparse_v2", "pull_box_sparse"];其中lookup_table传入的size是两维,pull_sparse/pull_sparse_v2/pull_box_sparse传入的size都只是一维的;
  • 但在optimizer_factory.py中的_gen_distributed_emb_to_size_dict函数,local_vars[table_name].shape[1]只考虑了两维的情况,因此调用pull_box_sparse时报index out of range的错误
    image

解决方法:

  • 考虑size为1维和2维的情况,改为从shape最后一维获取emb_size

@paddle-bot-old
Copy link

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

@@ -328,13 +328,10 @@ def _check_config_fleet_with_program_op(self, strategy, table_name,
strategy[table_name] = dict()
st = strategy[table_name]

accessor = None
accessor = "DownpourCtrAccessor"
Copy link
Contributor

Choose a reason for hiding this comment

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

why DownpourCtrAccessor default

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If use doesn't config sparse_accessor_class in config_fleet.py,we set "DownpourCtrAccessor" as default accessor

@yaoxuefeng6 yaoxuefeng6 merged commit f1654de into PaddlePaddle:develop Jul 28, 2021
WorgenZhang added a commit to WorgenZhang/Paddle that referenced this pull request Jul 28, 2021
fuyinno4 pushed a commit that referenced this pull request Aug 12, 2021
fuyinno4 pushed a commit that referenced this pull request Aug 17, 2021
* [CPU-PSLIB] Fix bug for consistency insepection of op's embedding name and sparse table name in config_fleet.py (#34441)

* [CPU-PSLIB] Add config for scale_sparse_grad in config_fleet.py
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