forked from xorbitsai/mars
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ray] Support scheduling ray tasks in Ray oscar deploy backend (mars-…
…project#3165) * support ray task mode on oscar * fix mars on ray serialization * fix ray dag serialization for local mode * refine clean serializers * fix register ray_serializers * fix tests * revert load_config * support mars supervisor for ray task mode * fix use_ray_serialization * fix register and clean ray_serializers * fix test_sync_execute create session duplciately * fix tests * lint * add test_ray_dag_oscar to ci * validate backend parameter (cherry picked from commit 8ee68e2)
- Loading branch information
1 parent
d93ec58
commit 131a89b
Showing
7 changed files
with
109 additions
and
14 deletions.
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