Skip to content

Commit

Permalink
Add patch
Browse files Browse the repository at this point in the history
  • Loading branch information
wjsi committed Oct 29, 2023
1 parent a243599 commit 0ed6174
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/platform-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
include:
- { os: ubuntu-latest, python-version: 3.8-kubernetes, no-common-tests: 1,
no-deploy: 1, with-kubernetes: "with Kubernetes" }
- { os: ubuntu-latest, python-version: 3.8-hadoop, no-common-tests: 1,
- { os: ubuntu-20.04, python-version: 3.8-hadoop, no-common-tests: 1,
no-deploy: 1, with-hadoop: "with hadoop" }
- { os: ubuntu-latest, python-version: 3.8-vineyard, no-common-tests: 1,
no-deploy: 1, with-vineyard: "with vineyard" }
Expand Down Expand Up @@ -89,9 +89,9 @@ jobs:
./ci/install-hadoop.sh
echo "import coverage; coverage.process_startup()" > \
$(python -c "import site; print(site.getsitepackages()[-1])")/coverage.pth
sudo apt-get install gcc-4.9
sudo apt-get upgrade libstdc++6
conda install -n test --quiet --yes -c conda-forge python=$PYTHON skein libffi conda-pack
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt install -y g++-11
conda install -n test --quiet --yes -c conda-forge python=$PYTHON skein libffi conda-pack "grpcio<1.54"
fi
if [ -n "$WITH_VINEYARD" ]; then
pip install vineyard -i https://pypi.org/simple
Expand All @@ -106,8 +106,7 @@ jobs:
rm -fr /tmp/etcd-$ETCD_VER-linux-amd64.tar.gz /tmp/etcd-download-test
fi
if [ -n "$WITH_RAY" ] || [ -n "$WITH_RAY_DAG" ] || [ -n "$WITH_RAY_DEPLOY" ]; then
pip install "ray>=1.8.0,<2.4.0"
pip install xgboost_ray "protobuf<4"
pip install "ray>=1.8.0,<2.4.0" "xgboost<2" "xgboost_ray<0.1.14" "protobuf<4"
# Ray Datasets need pyarrow>=6.0.1
pip install "pyarrow>=6.0.1"
pip install lightgbm
Expand Down
5 changes: 3 additions & 2 deletions mars/dataframe/contrib/raydataset/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ def __getstate__():
state.pop("dataframe", None)
return state

# `dataframe` is not serializable by ray.
dataset.__getstate__ = __getstate__
if not hasattr(type(dataset), "__getstate__"):
# if `dataframe` is not serializable by ray, patch our implementation
dataset.__getstate__ = __getstate__
return dataset


Expand Down
5 changes: 3 additions & 2 deletions mars/dataframe/contrib/raydataset/mldataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ def __getstate__():
state.pop("dataframe", None)
return state

# `dataframe` is not serializable by ray.
dataset.__getstate__ = __getstate__
if not hasattr(dataset, "__getstate__"):
# `dataframe` is not serializable by ray.
dataset.__getstate__ = __getstate__

Check warning on line 136 in mars/dataframe/contrib/raydataset/mldataset.py

View check run for this annotation

Codecov / codecov/patch

mars/dataframe/contrib/raydataset/mldataset.py#L136

Added line #L136 was not covered by tests
return dataset

0 comments on commit 0ed6174

Please sign in to comment.