MLflow Slow Tests #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A daily job to run slow tests with MLFLOW_RUN_SLOW_TESTS environment variable set to true. | |
name: MLflow Slow Tests | |
on: | |
pull_request: | |
paths: | |
# Run this workflow in PR when relevant files change | |
- ".github/workflows/slow-tests.yml" | |
- "tests/pyfunc/docker/**" | |
workflow_dispatch: | |
inputs: | |
repository: | |
description: > | |
[Optional] Repository name with owner. For example, mlflow/mlflow. | |
Defaults to the repository that triggered a workflow. | |
required: false | |
default: "" | |
ref: | |
description: > | |
[Optional] The branch, tag or SHA to checkout. When checking out the repository that | |
triggered a workflow, this defaults to the reference or SHA for that event. Otherwise, | |
uses the default branch. | |
required: false | |
default: "" | |
schedule: | |
# Run this workflow daily at 13:00 UTC | |
- cron: "0 13 * * *" | |
permissions: | |
contents: read | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash --noprofile --norc -exo pipefail {0} | |
env: | |
MLFLOW_RUN_SLOW_TESTS: "true" | |
MLFLOW_HOME: /home/runner/work/mlflow/mlflow | |
PIP_EXTRA_INDEX_URL: https://download.pytorch.org/whl/cpu | |
jobs: | |
docker-build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 120 | |
if: (github.event_name == 'schedule' && github.repository == 'mlflow-automation/mlflow') || github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.draft == false) | |
strategy: | |
fail-fast: false | |
matrix: | |
group: [1, 2, 3] | |
include: | |
- splits: 3 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: ./.github/actions/free-disk-space | |
- uses: ./.github/actions/untracked | |
- uses: ./.github/actions/setup-python | |
with: | |
python-version: 3.9 | |
- uses: ./.github/actions/setup-pyenv | |
- uses: ./.github/actions/setup-java | |
- name: Install dependencies | |
run: | | |
python -m venv .venv | |
source .venv/bin/activate | |
source ./dev/install-common-deps.sh --ml | |
# transformers requires `tf-keras` when keras 3.0 is installed. | |
# See https://github.com/huggingface/transformers/issues/27377 for more details. | |
# Installing pyarrow < 18 to prevent lightgbm test pip installation resolution conflicts. | |
python -m pip install langchain_experimental tf-keras "pyarrow<18" | |
- uses: ./.github/actions/show-versions | |
- uses: ./.github/actions/pipdeptree | |
- name: Run tests | |
run: | | |
source .venv/bin/activate | |
pytest --splits=${{ matrix.splits }} --group=${{ matrix.group }} tests/pyfunc/docker |