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

Fix/macos all runtimes #1823

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
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
16 changes: 12 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ jobs:
matrix:
os:
- ubuntu-22.04
- macos-13
- macos-12
python-version:
- "3.9"
- "3.10"
Expand All @@ -186,9 +186,17 @@ jobs:
- name: Setup Docker (missing on MacOS)
if: runner.os == 'macOS'
run: ./hack/install-docker-macos.sh
- name: Install OpenMP (in MacOS)
if: runner.os == 'macOS'
run: brew install libomp
- name: Downgrade OpenMP (in MacOS)
if: runner.os == 'macos'
run: |
# Recent versions of OpenMP cause segfaults in MacOS when training
# LightGBM / XGBoost models (but only when Torch is present)
# https://github.com/microsoft/LightGBM/issues/4229
# https://github.com/autogluon/autogluon/issues/1442
wget https://raw.githubusercontent.com/chenrui333/homebrew-core/0094d1513ce9e2e85e07443b8b5930ad298aad91/Formula/libomp.rb
brew unlink libomp
brew install --build-from-source ./libomp.rb
brew list --version libomp
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
Expand Down
21 changes: 13 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@ commands_pre =
poetry install --sync --no-root
commands =
python -m pytest {posargs} -n auto \
{toxinidir}/tests --ignore={toxinidir}/tests/kafka
# kafka tests are failinig for macos when running in parallel
{toxinidir}/tests \
--ignore={toxinidir}/tests/kafka \
--ignore={toxinidir}/tests/parallel
# kafka and parallel tests are failing for macos when running in parallel
# with the entire test suite. So, we run them separately.
python -m pytest {posargs} -n auto \
{toxinidir}/tests/kafka
python -m pytest {posargs} \
{toxinidir}/tests/kafka \
{toxinidir}/tests/parallel
set_env =
GITHUB_SERVER_URL = {env:GITHUB_SERVER_URL:https\://github.com}
GITHUB_REPOSITORY = {env:GITHUB_REPOSITORY:SeldonIO/MLServer}
Expand All @@ -46,11 +49,13 @@ commands =
{toxinidir}/runtimes/lightgbm \
{toxinidir}/runtimes/mlflow \
{toxinidir}/runtimes/huggingface \
--ignore={toxinidir}/tests/kafka
# kafka tests are failinig for macos when running in parallel
--ignore={toxinidir}/tests/kafka \
--ignore={toxinidir}/tests/parallel
# kafka and parallel tests are failinig for macos when running in parallel
# with the entire test suite. So, we run them separately.
python -m pytest {posargs} -n auto \
{toxinidir}/tests/kafka
python -m pytest {posargs} \
{toxinidir}/tests/kafka \
{toxinidir}/tests/parallel
set_env =
GITHUB_SERVER_URL = {env:GITHUB_SERVER_URL:https\://github.com}
GITHUB_REPOSITORY = {env:GITHUB_REPOSITORY:SeldonIO/MLServer}
Expand Down
Loading