-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
fleet support elastic scale up/down #36684
Merged
Merged
Changes from 12 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
10dada7
fleet support elastic train
xymyeah b2548e6
fleet support elastic train
xymyeah f126351
support elastic
xymyeah 3d2061b
add unittest
xymyeah 617942e
fix unitest bug
xymyeah 590f8f5
fix unittest bug
xymyeah 99b3095
fix unittest bug
xymyeah 6339b36
fix unittest coverage
xymyeah e8f3ee3
fix unittest coverage
xymyeah 115f13d
fix unittest coverage
xymyeah 862ebc3
fix unittest coverage
xymyeah c44b8f6
fix unittest coverage
xymyeah edbc42a
fix elastic bug
xymyeah c5086dc
fix ci fail
xymyeah ba5b9be
Merge remote-tracking branch 'upstream/develop' into develop
xymyeah 6f1e96b
fix ci fail
xymyeah aea23e2
fix elastic bug
xymyeah 327c379
fix elastic bug
xymyeah 03625c2
fix joint debugging bug
xymyeah 023dcd6
fix joint debugging bug
xymyeah 1c6ae0b
fix windows ci failed
xymyeah 7fb56cb
fix windows ci failed
xymyeah File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
python/paddle/fluid/tests/unittests/test_fleet_elastic_init.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
from __future__ import print_function | ||
|
||
import os | ||
import time | ||
import unittest | ||
import argparse | ||
from warnings import catch_warnings | ||
|
||
from paddle.distributed.fleet.elastic import enable_elastic, launch_elastic | ||
from paddle.distributed.fleet.launch_utils import DistributeMode | ||
|
||
|
||
class TestElasticInit(unittest.TestCase): | ||
def setUp(self): | ||
class Argument: | ||
elastic_server = "127.0.0.1:2379" | ||
job_id = "test_job_id_123" | ||
np = "2:4" | ||
|
||
self.args = Argument() | ||
|
||
def test_enable_elastic(self): | ||
result = enable_elastic(self.args, DistributeMode.COLLECTIVE) | ||
self.assertEqual(result, True) | ||
|
||
def test_launch_elastic(self): | ||
try: | ||
launch_elastic(self.args, DistributeMode.COLLECTIVE) | ||
except Exception as e: | ||
pass | ||
|
||
|
||
if __name__ == "__main__": | ||
unittest.main() |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should use elastic_client later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
当前只有etcd一种backend,后续可考虑提供一种基于rpc的kv-store作为默认的client