Skip to content

Commit

Permalink
BLD: Fix self-hosted CI env (xorbitsai#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
luweizheng committed Sep 24, 2024
1 parent abf4cde commit f5cd9c5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ jobs:
needs: lint
env:
CONDA_ENV: xoscar-test
SELF_HOST_PYTHON: /root/miniconda3/envs/xoscar-test/bin/python
SELF_HOST_CONDA: /root/miniconda3/condabin/conda
defaults:
run:
shell: bash -l {0}
Expand All @@ -85,7 +87,7 @@ jobs:
- { os: windows-latest, python-version: 3.9}
- { os: windows-latest, python-version: 3.10}
include:
- { os: self-hosted, module: gpu, python-version: 3.9}
- { os: self-hosted, module: gpu, python-version: 3.11}

steps:
- name: Check out code
Expand Down Expand Up @@ -131,7 +133,12 @@ jobs:
- name: Install on GPU
if: ${{ matrix.module == 'gpu' }}
run: |
python setup.py build_ext -i
source activate ${{ env.CONDA_ENV }}
conda install -y conda-forge::nccl=2.22.3
pip install --extra-index-url=https://pypi.nvidia.com cudf-cu12
pip install ucx-py-cu12 cloudpickle psutil tblib uvloop packaging "numpy<2.0.0" scipy cython coverage flaky
python setup.py clean --all
pip install -e ./
working-directory: ./python

- name: Test with pytest
Expand All @@ -143,6 +150,7 @@ jobs:
-W ignore::PendingDeprecationWarning \
--cov-config=setup.cfg --cov-report=xml --cov=xoscar xoscar --capture=no
else
source activate ${{ env.CONDA_ENV }}
pytest -m cuda --cov-config=setup.cfg --cov-report=xml --cov=xoscar --capture=no
fi
working-directory: ./python
Expand Down
5 changes: 3 additions & 2 deletions python/xoscar/serialization/tests/test_serial.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,9 @@ def test_cudf():
test_df = cudf.DataFrame(raw_df)
cudf.testing.assert_frame_equal(test_df, deserialize(*serialize(test_df)))

raw_df.columns = pd.MultiIndex.from_tuples([("a", "a"), ("a", "b"), ("b", "c")])
test_df = cudf.DataFrame(raw_df)
multi_index = pd.MultiIndex.from_tuples([("a", "a"), ("a", "b"), ("b", "c")])
raw_df.columns = multi_index
test_df = cudf.DataFrame(raw_df, columns=multi_index)
cudf.testing.assert_frame_equal(test_df, deserialize(*serialize(test_df)))


Expand Down

0 comments on commit f5cd9c5

Please sign in to comment.