Skip to content

Commit 37455c1

Browse files
Xuye (Chris) Qinhekaishengwjsichaokunyang
authored
Migrate tensor/dataframe/learn tests to oscar (#2106)
Co-authored-by: hekaisheng <kaisheng.hks@alibaba-inc.com> Co-authored-by: wenjun.swj <wenjun.swj@alibaba-inc.com> Co-authored-by: chaokunyang <shawn.ck.yang@gmail.com> Co-authored-by: wjsi <swj0066@gmail.com>
1 parent 65d84b9 commit 37455c1

File tree

804 files changed

+35868
-87379
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

804 files changed

+35868
-87379
lines changed

.codecov.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ ignore:
2424
- "mars/lib/futures"
2525
- "mars/lib/enum.py"
2626
- "mars/lib/six.py"
27-
- "mars/lib/gipc.pyx"
2827
- "mars/lib/nvutils.py"
2928
- "mars/lib/tblib"
3029
- "mars/lib/uhashring"

.coveragerc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
# this configuration is for mars.tensor module as
2+
# coverage.py currently doesn't support measuring
3+
# gevent with threading.
4+
15
[run]
26
branch = True
37
relative_files = True
48
cover_pylib = False
5-
concurrency = multiprocessing,gevent
69
parallel = True
10+
concurrency = multiprocessing,thread
711
plugins = Cython.Coverage
812
include =
913
mars/*
@@ -15,7 +19,6 @@ omit =
1519
mars/lib/futures/*
1620
mars/lib/enum.py
1721
mars/lib/six.py
18-
mars/lib/gipc.pyx
1922
mars/lib/nvutils.py
2023
mars/lib/tblib/*
2124
mars/lib/uhashring/*

.coveragerc-threaded

Lines changed: 0 additions & 46 deletions
This file was deleted.

.github/workflows/core-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
run: |
9090
source ./ci/reload-env.sh
9191
# stop the build if there are Python syntax errors or undefined names
92-
flake8 mars --count --select=E9,E111,E225,E302,E303,E901,E999,F7,F63,F82,F401,F821,F822,F823,F841,W291,W292,W391,W605 --show-source --statistics
92+
flake8 mars --count --select=E9,E111,E225,E302,E303,E901,E999,F7,F63,F82,F401,F811,F821,F822,F823,F841,W291,W292,W391,W605 --show-source --statistics
9393
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
9494
flake8 mars --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
9595

.github/workflows/os-compat-ci.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,12 @@ jobs:
7575
7676
export NO_SERIALIZE_IN_TEST_EXECUTOR=1
7777
mkdir -p build
78-
python -m pytest $PYTEST_CONFIG --cov-config .coveragerc-threaded --timeout=1500 \
79-
mars/dataframe mars/learn mars/remote mars/serialize mars/storage mars/tensor
80-
mv .coverage build/.coverage.tensor.file
8178
if [[ $UNAME == "darwin" ]]; then
82-
python -m pytest $PYTEST_CONFIG --cov-config .coveragerc --forked --timeout=1500 \
83-
--ignore mars/tests/test_kvstore.py mars/oscar mars/storage mars/deploy/local \
84-
mars/web mars/lib mars/tests
79+
python -m pytest $PYTEST_CONFIG --forked --timeout=1500 \
80+
mars/oscar mars/storage mars/lib mars/tests
8581
mv .coverage build/.coverage.dist.file
8682
elif [[ $UNAME == "windows" ]]; then
87-
python -m pytest $PYTEST_CONFIG --cov-config .coveragerc-threaded --timeout=1500 \
83+
python -m pytest $PYTEST_CONFIG --timeout=1500 \
8884
mars/oscar
8985
mv .coverage build/.coverage.dist.file
9086
fi

.github/workflows/platform-ci.yml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ jobs:
99
fail-fast: false
1010
matrix:
1111
os: [ubuntu-latest]
12-
python-version: [3.8-kubernetes, 3.8-hadoop, 3.8-vineyard, 3.8-ray]
12+
python-version: [3.8-kubernetes, 3.8-ray] # [3.8-kubernetes, 3.8-hadoop, 3.8-vineyard, 3.8-ray]
1313
include:
1414
- { os: ubuntu-latest, python-version: 3.8-kubernetes, no-common-tests: 1,
1515
no-deploy: 1, with-kubernetes: "with Kubernetes" }
16-
- { os: ubuntu-latest, python-version: 3.8-hadoop, no-common-tests: 1,
17-
no-deploy: 1, with-hadoop: "with hadoop" }
18-
- { os: ubuntu-latest, python-version: 3.8-vineyard, no-common-tests: 1,
19-
no-deploy: 1, with-vineyard: "with vineyard" }
16+
#- { os: ubuntu-latest, python-version: 3.8-hadoop, no-common-tests: 1,
17+
# no-deploy: 1, with-hadoop: "with hadoop" }
18+
#- { os: ubuntu-latest, python-version: 3.8-vineyard, no-common-tests: 1,
19+
# no-deploy: 1, with-vineyard: "with vineyard" }
2020
- { os: ubuntu-latest, python-version: 3.8-ray, no-common-tests: 1,
2121
no-deploy: 1, with-ray: "with ray" }
2222

@@ -122,31 +122,28 @@ jobs:
122122
123123
if [ -n "$WITH_HADOOP" ]; then
124124
source $CONDA/bin/activate test
125-
pytest $PYTEST_CONFIG --cov-config .coveragerc-threaded -m hadoop
125+
pytest $PYTEST_CONFIG -m hadoop
126126
coverage report
127127
fi
128128
if [ -n "$WITH_KUBERNETES" ]; then
129-
pytest $PYTEST_CONFIG --cov-config .coveragerc --forked mars/deploy/kubernetes
129+
pytest $PYTEST_CONFIG --forked mars/deploy/kubernetes
130130
coverage report
131131
fi
132132
if [ -n "$WITH_VINEYARD" ]; then
133133
export VINEYARD_IPC_SOCKET=/tmp/vineyard/vineyard.sock
134134
mkdir -p build
135135
136-
pytest $PYTEST_CONFIG --cov-config .coveragerc mars/storage/tests/test_libs.py
136+
pytest $PYTEST_CONFIG mars/storage/tests/test_libs.py
137137
mv .coverage build/.coverage.test_lib.file
138138
139-
pytest $PYTEST_CONFIG --cov-config .coveragerc-threaded mars/dataframe/datastore/tests/test_datastore_execute.py \
139+
pytest $PYTEST_CONFIG mars/dataframe/datastore/tests/test_datastore_execute.py \
140140
mars/tensor/datastore/tests/test_datastore_execute.py -k "vineyard"
141141
mv .coverage build/.coverage.test_tensor.file
142142
143-
pytest $PYTEST_CONFIG --cov-config .coveragerc-threaded mars/deploy/local/tests/test_cluster.py -k "VineyardEnabledTest"
144-
mv .coverage build/.coverage.test_cluster.file
145-
146143
coverage combine build/ && coverage report
147144
fi
148145
if [ -n "$WITH_RAY" ]; then
149-
pytest $PYTEST_CONFIG --cov-config .coveragerc-threaded -m ray
146+
pytest $PYTEST_CONFIG -m ray
150147
coverage report
151148
fi
152149
coverage xml

.github/workflows/run-tests.sh

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,23 @@
22
set -e
33
if [ -n "$WITH_CYTHON" ]; then
44
mkdir -p build
5-
pytest $PYTEST_CONFIG --cov-config .coveragerc --ignore-glob "*/integrated/*" \
6-
--ignore mars/tests/test_mutable.py mars/serialize mars/optimizes mars/tests
7-
mv .coverage build/.coverage.non-fork.file
8-
95
export POOL_START_METHOD=forkserver
106

11-
retry -n 20 -g INTERNALERROR pytest $PYTEST_CONFIG --cov-config .coveragerc mars/oscar
7+
retry -n 20 -g INTERNALERROR pytest $PYTEST_CONFIG --forked mars/tests mars/core/graph
8+
mv .coverage build/.coverage.non-oscar.file
9+
10+
retry -n 20 -g INTERNALERROR pytest $PYTEST_CONFIG --forked mars/oscar
1211
mv .coverage build/.coverage.oscar_ctx.file
1312

14-
pytest $PYTEST_CONFIG --cov-config .coveragerc --forked mars/actors mars/deploy/local \
15-
mars/scheduler mars/web
16-
mv .coverage build/.coverage.fork.file
1713
coverage combine build/ && coverage report
1814
fi
1915
if [ -z "$NO_COMMON_TESTS" ]; then
2016
mkdir -p build
21-
pytest $PYTEST_CONFIG --cov-config .coveragerc-threaded mars/tensor mars/dataframe mars/web \
22-
mars/learn mars/remote mars/storage mars/lib
23-
mv .coverage build/.coverage.tensor.file
24-
pytest $PYTEST_CONFIG --cov-config .coveragerc-threaded --forked mars/oscar mars/services
25-
mv .coverage build/.coverage.oscar.file
26-
pytest $PYTEST_CONFIG --cov-config .coveragerc --forked --ignore mars/tensor --ignore mars/dataframe \
27-
--ignore mars/learn --ignore mars/remote --ignore mars/services --ignore mars/oscar mars
17+
pytest $PYTEST_CONFIG mars/remote mars/storage mars/lib
18+
mv .coverage build/.coverage.tileable.file
19+
20+
pytest $PYTEST_CONFIG --forked --ignore mars/tensor --ignore mars/dataframe \
21+
--ignore mars/learn --ignore mars/remote mars
2822
mv .coverage build/.coverage.main.file
2923
coverage combine build/ && coverage report
3024

azure-pipelines.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -68,25 +68,19 @@ jobs:
6868
6969
if [ -z "$NO_COMMON_TESTS" ]; then
7070
if [[ ! "$PYTHON" =~ "3.6" ]] && [[ ! "$PYTHON" =~ "3.9" ]]; then
71-
pip install h5py zarr matplotlib
71+
pip install h5py zarr matplotlib fastparquet
7272
conda install -n test --quiet --yes -c conda-forge python=$PYTHON \
7373
"tiledb-py>=0.4.3,<0.6.0" "tiledb<2.0.0" || true
7474
fi
7575
7676
conda install -n test --quiet --yes -c pkgs/main python=$PYTHON certifi
7777
7878
if [[ "$(mars.test.module)" == "learn" ]]; then
79-
if [[ ! "$PYTHON" =~ "3.9" ]]; then
80-
conda install --quiet --yes -n test -c conda-forge --no-deps python=$PYTHON \
81-
libxgboost py-xgboost xgboost lightgbm tensorflow
82-
fi
83-
if [[ "$PYTHON" =~ "3.6" ]]; then
84-
pip install torch==1.4.0 torchvision==0.5.0 faiss-cpu fastparquet
85-
fi
86-
if [[ ! "$PYTHON" =~ "3.6" ]] && [[ ! "$PYTHON" =~ "3.9" ]]; then
87-
pip install torch torchvision
88-
pip install statsmodels tsfresh
89-
fi
79+
conda install --quiet --yes -n test -c conda-forge --no-deps python=$PYTHON \
80+
libxgboost py-xgboost xgboost lightgbm tensorflow
81+
pip install faiss-cpu
82+
pip install torch torchvision
83+
pip install statsmodels tsfresh
9084
fi
9185
fi
9286
conda list -n test
@@ -101,7 +95,7 @@ jobs:
10195
- bash: |
10296
set -e
10397
source ci/reload-env.sh
104-
pytest $PYTEST_CONFIG --cov-config .coveragerc-threaded mars/$(mars.test.module)
98+
pytest $PYTEST_CONFIG mars/$(mars.test.module)
10599
coverage report
106100
coverage xml
107101
displayName: 'Run tests'

mars/__init__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,4 @@
1616

1717
from ._version import __version__
1818
from .config import options
19-
20-
from .core.session import new_session, execute, fetch, stop_server
21-
# register
22-
from .deploy.oscar.session import Session
23-
del Session
19+
from .session import new_session, execute, fetch, fetch_log, stop_server

mars/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import os
1717
from typing import NamedTuple, Optional
1818

19-
version_info = (0, 7, 0, 'b1')
19+
version_info = (0, 7, 0, 'b2')
2020
_num_index = max(idx if isinstance(v, int) else 0
2121
for idx, v in enumerate(version_info))
2222
__version__ = '.'.join(map(str, version_info[:_num_index + 1])) + \

mars/actors/__init__.py

Lines changed: 0 additions & 27 deletions
This file was deleted.

mars/actors/cluster.pxd

Lines changed: 0 additions & 25 deletions
This file was deleted.

mars/actors/cluster.pyx

Lines changed: 0 additions & 32 deletions
This file was deleted.

mars/actors/core.pxd

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)