Skip to content

Commit adf9fc8

Browse files
zhongchunaresnow1mergify[bot]
authored
[Dependency] Solve dependency compatibility issues (#3346)
* Pin ray<2.4.0 * Pin ray version in ci * use 'pip install scikit-learn' rather than 'pip install sklearn' * Pin mimesis<9.0.0 because iterations parameter for all methods of Schema has been removed * CHORE: Compatible with Arrow 12.0.0 (#426) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> * Remove plasma storage setting * Ignore FileNotFoundError of Python 3.7.x or below * Ignore tests using shared memory of Python 3.7.x or below * Remove two _system_config Ray does not support and change plasma to shared_memory in k8s --------- Co-authored-by: aresnow1 <109642806+aresnow1@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
1 parent 412d71c commit adf9fc8

File tree

14 files changed

+28
-59
lines changed

14 files changed

+28
-59
lines changed

.github/workflows/platform-ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,13 @@ jobs:
104104
rm -fr /tmp/etcd-$ETCD_VER-linux-amd64.tar.gz /tmp/etcd-download-test
105105
fi
106106
if [ -n "$WITH_RAY" ] || [ -n "$WITH_RAY_DAG" ] || [ -n "$WITH_RAY_DEPLOY" ]; then
107+
pip install "ray>=1.8.0,<2.4.0"
107108
pip install "xgboost_ray<0.1.14" "protobuf<4"
108109
# Ray Datasets need pyarrow>=6.0.1
109110
pip install "pyarrow>=6.0.1"
110111
fi
111112
if [ -n "$RUN_DASK" ]; then
112-
pip install dask[complete] mimesis sklearn
113+
pip install "dask[complete]" "mimesis<9.0.0" scikit-learn
113114
fi
114115
fi
115116
conda list -n test

mars/deploy/kubernetes/config.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,4 @@
22
cluster:
33
backend: k8s
44
storage:
5-
backends: [plasma]
6-
plasma:
7-
store_memory: 20%
5+
backends: [shared_memory]

mars/deploy/oscar/tests/fault_injection_config_with_rerun.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,3 @@ third_party_modules:
44
scheduling:
55
subtask_max_retries: 2
66
subtask_max_reschedules: 2
7-
storage:
8-
# shared-memory38 may lose object if the process crash after put success.
9-
backends: [plasma]

mars/deploy/oscar/tests/test_fault_injection.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
# limitations under the License.
1414

1515
import os
16+
import sys
17+
1618
import pytest
1719
import traceback
1820
import numpy as np
@@ -197,6 +199,10 @@ async def test_rerun_subtask(fault_cluster, fault_config):
197199
await info
198200

199201

202+
@pytest.mark.skipif(
203+
sys.version_info[:2] < (3, 8),
204+
reason="Skip due to the incompatibilities of shared memory.",
205+
)
200206
@pytest.mark.parametrize(
201207
"fault_cluster", [{"config": RERUN_SUBTASK_CONFIG_FILE}], indirect=True
202208
)

mars/deploy/oscar/tests/test_local.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,8 +1059,6 @@ async def speculative_cluster():
10591059
config["scheduling"]["speculation"]["max_concurrent_run"] = 10
10601060
config["scheduling"]["subtask_cancel_timeout"] = 0.1
10611061
config["scheduling"]["enable_kill_slot"] = True
1062-
config["storage"]["backends"] = ["plasma"]
1063-
config["storage"]["plasma"]["store_memory"] = 10 * 1024 * 1024
10641062
client = await new_cluster(
10651063
config=config,
10661064
n_worker=5,

mars/deploy/oscar/tests/test_ray_dag_failover.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ def test_basic_object_reconstruction(
4747
ray_large_cluster, reconstruction_enabled, stop_mars
4848
):
4949
config = {
50-
"num_heartbeats_timeout": 10,
51-
"raylet_heartbeat_period_milliseconds": 200,
5250
"object_timeout_milliseconds": 200,
5351
}
5452
# Workaround to reset the config to the default value.

mars/services/storage/api/oscar.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -330,21 +330,7 @@ async def create(
330330

331331
storage_configs = kwargs.get("storage_configs")
332332
if not storage_configs:
333-
if sys.platform == "darwin":
334-
plasma_dir = "/tmp"
335-
else:
336-
plasma_dir = "/dev/shm"
337-
plasma_setup_params = dict(
338-
store_memory=10 * 1024 * 1024,
339-
plasma_directory=plasma_dir,
340-
check_dir_size=False,
341-
)
342-
if _is_windows:
343-
storage_configs = {"shared_memory": {}}
344-
else:
345-
storage_configs = {
346-
"plasma": plasma_setup_params,
347-
}
333+
storage_configs = {"shared_memory": {}}
348334

349335
storage_handler_cls = kwargs.pop("storage_handler_cls", StorageHandlerActor)
350336
await mo.create_actor(

mars/services/storage/tests/test_api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
import numpy as np
1919
import pandas as pd
20+
import pyarrow as pa
2021
import pytest
2122

2223
from .... import oscar as mo
@@ -47,7 +48,7 @@
4748
plasma_setup_params = dict(
4849
store_memory=plasma_storage_size, plasma_directory=plasma_dir, check_dir_size=False
4950
)
50-
if not sys.platform.lower().startswith("win"):
51+
if not (sys.platform.lower().startswith("win") or pa.__version__ >= "12.0.0"):
5152
storage_configs.append({"plasma": plasma_setup_params})
5253

5354
# ray backend

mars/services/storage/tests/test_service.py

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,10 @@ async def start_pool():
5959
async def test_storage_service(actor_pools):
6060
worker_pool = actor_pools
6161

62-
if sys.platform == "darwin":
63-
plasma_dir = "/tmp"
64-
else:
65-
plasma_dir = "/dev/shm"
66-
plasma_setup_params = dict(
67-
store_memory=10 * 1024 * 1024, plasma_directory=plasma_dir, check_dir_size=False
68-
)
69-
7062
config = {
7163
"services": ["storage"],
7264
"storage": {
73-
"backends": ["plasma" if not _is_windows else "shared_memory"],
74-
"plasma": plasma_setup_params,
65+
"backends": ["shared_memory"],
7566
},
7667
}
7768

@@ -155,19 +146,11 @@ async def test_storage_service_with_cuda(actor_pools_with_gpu):
155146

156147
worker_pool = actor_pools_with_gpu
157148

158-
if sys.platform == "darwin":
159-
plasma_dir = "/tmp"
160-
else:
161-
plasma_dir = "/dev/shm"
162-
plasma_setup_params = dict(
163-
store_memory=10 * 1024 * 1024, plasma_directory=plasma_dir, check_dir_size=False
164-
)
165-
166149
config = {
167150
"services": ["storage"],
168151
"storage": {
169-
"backends": ["plasma" if not _is_windows else "shared_memory", "cuda"],
170-
"plasma": plasma_setup_params,
152+
"backends": ["shared_memory", "cuda"],
153+
"shared_memory": dict(),
171154
"cuda": dict(),
172155
},
173156
}

mars/services/storage/tests/test_spill.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import tempfile
1919

2020
import numpy as np
21+
import pyarrow
2122
import pytest
2223

2324
from .... import oscar as mo
@@ -88,6 +89,12 @@ async def create_actors(actor_pool):
8889
await mo.destroy_actor(manager_ref)
8990

9091

92+
@pytest.fixture(autouse=True)
93+
async def skip_wihtout_plasma():
94+
if pyarrow.__version__ >= "12.0.0":
95+
pytest.skip("Pyarrow.Plasma is deprecated since v12.0.0")
96+
97+
9198
@pytest.mark.asyncio
9299
async def test_spill(create_actors):
93100
worker_address, _, _ = create_actors

0 commit comments

Comments
 (0)