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

【paddle.fleet】 Usages Change: from fleet.util() to fleet.util #27468

Merged
merged 13 commits into from
Sep 24, 2020

Conversation

123malin
Copy link
Contributor

@123malin 123malin commented Sep 22, 2020

PR types

Others

PR changes

APIs

Describe

修复fleet.util() -> fleet.util,当前util的使用示例为:

import paddle.distributed.fleet as fleet
fleet.init(is_collective=False)

files = fleet.util.get_file_shard(["file1", "file2", "file3"])
print(files)

自定义util的使用方法为:

import paddle.distributed.fleet as fleet

class UserDefinedUtil(fleet.UtilBase):
    def __init__(self):
        super(UserDefinedUtil, self).__init__()

    def get_user_id(self):
        return 10
fleet.init()
my_util = UserDefinedUtil()
fleet.util = my_util
user_id = fleet.util.get_user_id()
print(user_id)

@paddle-bot-old
Copy link

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

@paddle-bot-old
Copy link

paddle-bot-old bot commented Sep 22, 2020

✅ This PR's description meets the template requirements!
Please wait for other CI results.

@123malin 123malin changed the title test=develop, bug fix 【paddle.fleet】use fleet.util to replace fleet.util() Sep 23, 2020
@123malin 123malin changed the title 【paddle.fleet】use fleet.util to replace fleet.util() 【paddle.fleet】 Usages Change: from fleet.util() to fleet.util Sep 23, 2020
Copy link
Member

@guru4elephant guru4elephant left a comment

Choose a reason for hiding this comment

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

LGTM

@guru4elephant guru4elephant merged commit 32ad4f9 into PaddlePaddle:develop Sep 24, 2020
Copy link
Collaborator

@seiriosPlus seiriosPlus left a comment

Choose a reason for hiding this comment

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

LGTM

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.

None yet

3 participants