Skip to content

Commit

Permalink
Update Python requirement to >=3.8. (#8071)
Browse files Browse the repository at this point in the history
Additional changes:
- Use mamba for CPU test on Jenkins.
- Cleanup CPU test dependencies.
- Restore some of the modin tests
  • Loading branch information
trivialfis authored Jul 14, 2022
1 parent 8dd9601 commit dae7a41
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 31 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ jobs:
submodules: 'true'
- uses: actions/setup-python@v2
with:
python-version: '3.7'
python-version: "3.8"
architecture: 'x64'
- name: Install Python packages
run: |
Expand All @@ -155,7 +155,7 @@ jobs:
submodules: 'true'
- uses: actions/setup-python@v2
with:
python-version: '3.7'
python-version: "3.8"
architecture: 'x64'
- name: Install Python packages
run: |
Expand All @@ -173,7 +173,7 @@ jobs:
submodules: 'true'
- uses: actions/setup-python@v2
with:
python-version: '3.7'
python-version: "3.8"
architecture: 'x64'
- name: Install system packages
run: |
Expand Down Expand Up @@ -210,7 +210,7 @@ jobs:
submodules: 'true'
- uses: actions/setup-python@v2
with:
python-version: '3.8'
python-version: "3.8"
architecture: 'x64'
- name: Install system packages
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
python-version: "3.8"
- name: Build wheels
run: bash tests/ci_build/build_python_wheels.sh ${{ matrix.platform_id }} ${{ github.sha }}
- name: Extract branch name
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/r_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
- uses: actions/setup-python@v2
with:
python-version: '3.7'
python-version: "3.8"
architecture: 'x64'

- name: Test R
Expand Down
3 changes: 1 addition & 2 deletions python-package/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,11 +365,10 @@ def run(self) -> None:
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10'],
python_requires=">=3.7",
python_requires=">=3.8",
url='https://github.com/dmlc/xgboost')

clean_up()
6 changes: 3 additions & 3 deletions tests/ci_build/Dockerfile.cpu
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ RUN \
wget -nv -nc https://cmake.org/files/v3.14/cmake-3.14.0-Linux-x86_64.sh --no-check-certificate && \
bash cmake-3.14.0-Linux-x86_64.sh --skip-license --prefix=/usr && \
# Python
wget -O Miniconda3.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
bash Miniconda3.sh -b -p /opt/python
wget https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh && \
bash Mambaforge-Linux-x86_64.sh -b -p /opt/python

ENV PATH=/opt/python/bin:$PATH
ENV CC=gcc-8
Expand All @@ -28,7 +28,7 @@ ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/

# Create new Conda environment
COPY conda_env/cpu_test.yml /scripts/
RUN conda env create -n cpu_test --file=/scripts/cpu_test.yml
RUN mamba env create -n cpu_test --file=/scripts/cpu_test.yml

# Install lightweight sudo (not bound to TTY)
RUN set -ex; \
Expand Down
2 changes: 1 addition & 1 deletion tests/ci_build/build_python_wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if [[ "$platform_id" == macosx_* ]]; then
elif [[ "$platform_id" == macosx_x86_64 ]]; then
# MacOS, Intel
wheel_tag=macosx_10_15_x86_64.macosx_11_0_x86_64.macosx_12_0_x86_64
cpython_ver=37
cpython_ver=38
export MACOSX_DEPLOYMENT_TARGET=10.13
#OPENMP_URL="https://anaconda.org/conda-forge/llvm-openmp/11.1.0/download/osx-64/llvm-openmp-11.1.0-hda6cdc1_1.tar.bz2"
OPENMP_URL="https://xgboost-ci-jenkins-artifacts.s3.us-west-2.amazonaws.com/llvm-openmp-11.1.0-hda6cdc1_1-osx-64.tar.bz2"
Expand Down
2 changes: 1 addition & 1 deletion tests/ci_build/conda_env/aarch64_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: aarch64_test
channels:
- conda-forge
dependencies:
- python=3.7
- python=3.8
- pip
- wheel
- pytest
Expand Down
24 changes: 9 additions & 15 deletions tests/ci_build/conda_env/cpu_test.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: cpu_test
channels:
- defaults
- conda-forge
dependencies:
- python=3.7
- python=3.8
- pip
- wheel
- pyyaml
Expand All @@ -13,34 +14,27 @@ dependencies:
- scikit-learn
- pandas
- matplotlib
- dask
- distributed
- dask>=2022.6
- distributed>=2022.6
- python-graphviz
- hypothesis
- hypothesis>=6.46
- astroid
- sphinx
- sh
- recommonmark
- mock
- breathe
- pytest
- pytest-cov
- python-kubernetes
- urllib3
- jsonschema
- boto3
- awscli
- numba
- llvmlite
- py-ubjson
- cffi
- pyarrow
- protobuf<=3.20
- pyspark
- protobuf
- pyspark>=3.3.0
- cloudpickle
- shap
- modin
- pip:
- shap
- ipython # required by shap at import time.
- sphinx_rtd_theme
- datatable
- modin[all]
2 changes: 1 addition & 1 deletion tests/ci_build/conda_env/macos_cpu_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: macos_test
channels:
- conda-forge
dependencies:
- python=3.7
- python=3.8
- pip
- wheel
- pyyaml
Expand Down
3 changes: 1 addition & 2 deletions tests/python/test_with_modin.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@


class TestModin:

@pytest.mark.xfail
def test_modin(self):

df = md.DataFrame([[1, 2., True], [2, 3., False]],
columns=['a', 'b', 'c'])
dm = xgb.DMatrix(df, label=md.Series([1, 2]))
Expand Down

0 comments on commit dae7a41

Please sign in to comment.