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

fix entry #31079

Merged
merged 27 commits into from
Feb 24, 2021
Merged

Conversation

seiriosPlus
Copy link
Collaborator

@seiriosPlus seiriosPlus commented Feb 20, 2021

PR types

Bug fixes

PR changes

Others

Describe

飞桨分布式准入策略新增API:

  • paddle.distributed.ProbabilityEntry: 概率准入
  • paddle.distributed.CountFilterEntry: 频次准入

用法示例:

import paddle
paddle.enable_static()

embedding_dim = 128
# entry = paddle.distributed.ProbabilityEntry(10)
entry = paddle.distributed.CountFilterEntry(10)

x = paddle.static.data(name='X', shape=[1], dtype='int64')

emb = paddle.static.nn.sparse_embedding(
    input=x,
    size=[1024, embedding_dim],
    is_test=False,
    entry=CountFilterEntry(10),
    param_attr=paddle.ParamAttr(name="SparseFeatFactors"))
  1. 修复准入配置未正确传递给Server端的bug。
  2. 修复组网中多个embedding的输入输出存在冲突导致fuse失败的bug。
  3. 将准入策略 ProbabilityEntry 和 CountFilterEntry 迁移至 paddle.distributed 下。

123malin and others added 11 commits January 21, 2021 11:30
Change-Id: Icb5976151444720e9f186d0a33ac5fb0b74c2101
Change-Id: Ifb721421d29b6d22398499084062c2b2bd3031fd
Change-Id: If63c78702938677ca03de151aaf88b75794b9f78
… save_load_shrink

Change-Id: I954aed20aa24003aa2e16fe29006af5ca8dbfdec
Change-Id: I14edfa162ea8bf8ca5647b30d90be7085ca70552
Change-Id: I212801608ebdcb773336b24b7d65c338ffe5eda0
… save_load_shrink

Change-Id: I8efcd47f53b56edd719409910dce761068b99473
Change-Id: I599e04422f19f333243aaafd040a4c5dcfa033b5
… save_load_shrink

Change-Id: Icb60dcf7b86bd88aaceb48ad1fad16253f4f93f6
@paddle-bot-old
Copy link

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

Change-Id: I98d390ada7e875411015c39f35c2d1d0e130b0b8
@seiriosPlus seiriosPlus changed the title Feature/save load shrink fix entry Feb 20, 2021
Change-Id: Ifbcf29d1a66a7875f8e509892ebbd94c7feb03cb
Change-Id: Ie5f31230df3d162fee7087a7deb55ebdfb21498f
Change-Id: If86c71b17f18c88561c777766a5762818ea682d9
Change-Id: Ib8229c92a68aa28dd00200ba677ad81e8400eaf9
@PaddlePaddle PaddlePaddle locked as resolved and limited conversation to collaborators Feb 22, 2021
@PaddlePaddle PaddlePaddle unlocked this conversation Feb 22, 2021
Change-Id: Ibac5367961723cca3f45205a85054e77b126a4c1
Change-Id: I0ed1c8bf21109c3016c836d7454ce90ee7f1d8be
Change-Id: Ief21b91f0859da1997b3cd1683be6691edf96c5d
Change-Id: Ib2149d68e948bc8d72041cd7d3904d9b2c7f9036
Change-Id: I482f7a21fdfaedfb6e28e56ff504ecc9d7790e14
Change-Id: Iba7b87922bdd6503782c2e99413e5280acd33338
Change-Id: Iaa9bb2b2b59ffa23394f9b207957d36e30c6823f
Change-Id: Ia907a88aa5e1351312d3441e931f43f43389ff83
Change-Id: Iabbdc8c6ad438262e345f93ef20e4bb89c98cf9a
Change-Id: I8232e801ad0ba9282eb1f5ff4ec543eea63b8161

input = paddle.static.data(name='ins', shape=[1], dtype='int64')

emb = fluid.contrib.layers.sparse_embedding(
Copy link
Contributor

Choose a reason for hiding this comment

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

fluid.contrib.layers.sparse_embedding -> paddle.static.nn.sparse_embedding

size=[sparse_feature_dim, embedding_size],
is_test=False,
entry=entry,
param_attr=fluid.ParamAttr(name="SparseFeatFactors",
Copy link
Contributor

Choose a reason for hiding this comment

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

fluid.ParamAttr -> paddle.ParamAttr

is_test=False,
entry=entry,
param_attr=fluid.ParamAttr(name="SparseFeatFactors",
initializer=fluid.initializer.Uniform()))
Copy link
Contributor

Choose a reason for hiding this comment

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

fluid.initializer.Uniform() -> paddle.nn.initializer.Uniform

Change-Id: Ib5c3c34c7f97b68c5609b5514aeb2dcb008a9dc2
Copy link
Contributor

@TCChenlong TCChenlong left a comment

Choose a reason for hiding this comment

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

LGTM

@zhiqiu zhiqiu self-requested a review February 24, 2021 02:49
Copy link
Contributor

@zhiqiu zhiqiu left a comment

Choose a reason for hiding this comment

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

LGTM for contrib API sparse_embedding without core.ops

@seiriosPlus seiriosPlus merged commit ebbdf52 into PaddlePaddle:develop Feb 24, 2021
seiriosPlus added a commit to seiriosPlus/Paddle that referenced this pull request Feb 24, 2021
* fix entry

* fix distributed lookup table fuse case

* fix entry bug at first time

* move entry from paddle.fluid -> paddle.distributed

* fix ut with paddle.enable_static()

Co-authored-by: malin10 <malin10@baidu.com>
fuyinno4 pushed a commit that referenced this pull request Feb 25, 2021
* fix entry

* fix distributed lookup table fuse case

* fix entry bug at first time

* move entry from paddle.fluid -> paddle.distributed

* fix ut with paddle.enable_static()

Co-authored-by: malin10 <malin10@baidu.com>

Co-authored-by: malin10 <malin10@baidu.com>
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.

7 participants