Skip to content

[docs] A performance report of ray-ascend[yr] #194

[docs] A performance report of ray-ascend[yr]

[docs] A performance report of ray-ascend[yr] #194

Workflow file for this run

name: ray-ascend ci
on:
pull_request:
branches:
- master
workflow_dispatch:
jobs:
build-and-test:
runs-on: linux-aarch64-a3-2
container:
image: swr.cn-southwest-2.myhuaweicloud.com/base_image/ascend-ci/cann:8.2.rc1-a3-ubuntu22.04-py3.11
strategy:
matrix:
python-version: ["3.11"]
timeout-minutes: 10
steps:
- name: Config mirrors
run: |
sed -Ei 's@(ports|archive).ubuntu.com@cache-service.nginx-pypi-cache.svc.cluster.local:8081@g' /etc/apt/sources.list
pip config set global.index-url http://cache-service.nginx-pypi-cache.svc.cluster.local/pypi/simple
pip config set global.trusted-host cache-service.nginx-pypi-cache.svc.cluster.local
apt-get update -y
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Build Python ${{ matrix.python-version }} wheel
run: |
echo "Building for Python ${{ matrix.python-version }}..."
pip${{ matrix.python-version }} install build
pip${{ matrix.python-version }} install -r requirements.txt
python${{ matrix.python-version }} -m build --wheel
pip${{ matrix.python-version }} install "$(ls dist/*.whl)[test,yr]" --force-reinstall
- name: Run tests for Python ${{ matrix.python-version }}
run: |
echo "Running tests for Python ${{ matrix.python-version }}..."
python${{ matrix.python-version }} -m pytest -v tests/
- name: Install etcd
run: |
apt-get update && apt-get install -y curl
curl -s -L https://mirrors.huaweicloud.com/etcd/v3.6.5/etcd-v3.6.5-linux-arm64.tar.gz -o etcd-v3.6.5-linux-arm64.tar.gz
tar -xzf etcd-v3.6.5-linux-arm64.tar.gz
mv etcd-v3.6.5-linux-arm64/etcd /usr/local/bin/
- name: Install openyuanrong-datasystem
run: |
pip${{ matrix.python-version }} install "openyuanrong-datasystem>=0.8.0"
- name: Run performance test (etcd mode)
run: |
echo "start ray cluster"
ray start --head
echo "Running direct_transport_perftest.py (etcd mode)"
python${{ matrix.python-version }} tests/benchmarks/direct_transport_perftest.py --backend=yr --placement=local --device=npu --init-mode=etcd
echo "stop ray cluster"
ray stop
- name: Run performance test (metastore mode)
run: |
echo "start ray cluster"
ray start --head
echo "Running direct_transport_perftest.py (metastore mode)"
python${{ matrix.python-version }} tests/benchmarks/direct_transport_perftest.py --backend=yr --placement=local --device=npu --init-mode=metastore
echo "stop ray cluster"
ray stop
build-docs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: ${{ matrix.python-version }}
- name: Build documentation
run: |
pip install -r docs/requirements-docs.txt
python -m mkdocs build -f docs/mkdocs.yml