Skip to content

[RayDP 2.0] Support Spark 4.1, Java 17, and Scala 2.13 #1378

[RayDP 2.0] Support Spark 4.1, Java 17, and Scala 2.13

[RayDP 2.0] Support Spark 4.1, Java 17, and Scala 2.13 #1378

Workflow file for this run

#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You 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.
#
name: RayDP CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
workflow_dispatch:
permissions: # added using https://github.com/step-security/secure-repo
contents: read
jobs:
build-and-test:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.10", "3.12"]
spark-version: [4.1.1]
ray-version: [2.53.0]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'corretto'
- name: Install extra dependencies for Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get install -y mpich
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ matrix.os }}-${{ matrix.python-version }}-pip
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel build
if [ "$(uname -s)" == "Linux" ]
then
pip install torch --index-url https://download.pytorch.org/whl/cpu
else
pip install torch
fi
pip install "pandas>=2.2,<3" pyarrow "ray[train,default]==${{ matrix.ray-version }}" tqdm pytest tabulate grpcio-tools wget
pip install torchmetrics
- name: Cache Maven
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ matrix.os }}-m2-${{ hashFiles('core/pom.xml') }}
- name: Build and install
run: |
pip install pyspark==${{ matrix.spark-version }}
./build.sh
pip install dist/raydp-*.whl
- name: Lint
run: |
pip install pylint==3.3.6
pylint --rcfile=python/pylintrc python/raydp
pylint --rcfile=python/pylintrc examples/*.py
- name: Test with pytest
run: |
ray start --head --num-cpus 6
pytest python/raydp/tests/ -v \
--ignore=python/raydp/tests/test_tf.py \
--ignore=python/raydp/tests/test_xgboost.py
ray stop --force
- name: Test Examples
run: |
ray start --head
python examples/raydp-submit.py
python examples/test_raydp_submit_pyfiles.py
ray stop
python examples/data_process.py