-
Notifications
You must be signed in to change notification settings - Fork 327
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
[ray] Support scheduling ray tasks in Ray oscar deploy backend #3165
Merged
chaokunyang
merged 16 commits into
mars-project:master
from
chaokunyang:support_ray_task_deploy
Sep 7, 2022
Merged
Changes from 15 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
452ce81
support ray task mode on oscar
chaokunyang 3be0042
fix mars on ray serialization
chaokunyang c30c290
fix ray dag serialization for local mode
chaokunyang afbe6fd
refine clean serializers
chaokunyang e5927b2
fix register ray_serializers
chaokunyang 59b04aa
fix tests
chaokunyang 79b94c9
revert load_config
chaokunyang 595ed4d
support mars supervisor for ray task mode
chaokunyang 2f5cc8c
fix use_ray_serialization
chaokunyang 581dc20
fix register and clean ray_serializers
chaokunyang 11bf076
fix test_sync_execute create session duplciately
chaokunyang f563c00
fix tests
chaokunyang 0a67c89
lint
chaokunyang 506bd43
merge master and revert ray serialization register
chaokunyang a7ea6b6
add test_ray_dag_oscar to ci
chaokunyang 37b8c79
validate backend parameter
chaokunyang 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Copyright 1999-2021 Alibaba Group Holding Ltd. | ||
# | ||
# 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. | ||
|
||
import os | ||
|
||
import pytest | ||
|
||
from ....tests.core import require_ray | ||
from ....utils import lazy_import | ||
from ..ray import new_cluster, _load_config | ||
from ..tests import test_local | ||
|
||
ray = lazy_import("ray") | ||
CONFIG_FILE = os.path.join(os.path.dirname(__file__), "local_test_with_ray_config.yml") | ||
|
||
|
||
@pytest.fixture | ||
async def create_cluster(request): | ||
param = getattr(request, "param", {}) | ||
ray_config = _load_config(CONFIG_FILE) | ||
ray_config.update(param.get("config", {})) | ||
client = await new_cluster( | ||
supervisor_mem=1 * 1024**3, | ||
worker_num=2, | ||
worker_cpu=2, | ||
worker_mem=1 * 1024**3, | ||
backend="ray", | ||
config=ray_config, | ||
) | ||
async with client: | ||
yield client, param | ||
|
||
|
||
@require_ray | ||
@pytest.mark.asyncio | ||
async def test_iterative_tiling(ray_start_regular_shared2, create_cluster): | ||
await test_local.test_iterative_tiling(create_cluster) | ||
|
||
|
||
@pytest.mark.asyncio | ||
@require_ray | ||
async def test_execute_describe(ray_start_regular_shared2, create_cluster): | ||
await test_local.test_execute_describe(create_cluster) |
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
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
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.
Maybe it's better to specify the backend explicitly like
ray
or something others instead ofelse
statement.And we can raise an exception if user passes an unsupported backend.
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.
Good catch, we should validate the passed backend type, just fixed it.