Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BLD: Fix self-hosted CI env #102

Merged
merged 21 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading