Drop unsupported params for litellm models (#20045) #912
This file contains hidden or 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
| name: R | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - branch-[0-9]+.[0-9]+ | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| - ready_for_review | |
| schedule: | |
| # Run this workflow daily at 13:00 UTC | |
| - cron: "0 13 * * *" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| shell: bash | |
| env: | |
| MLFLOW_HOME: ${{ github.workspace }} | |
| PIP_CONSTRAINT: ${{ github.workspace }}/requirements/constraints.txt | |
| jobs: | |
| r: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 120 | |
| permissions: | |
| contents: read | |
| if: github.event_name == 'push' || (github.event_name == 'schedule' && github.repository == 'mlflow/dev') || (github.event_name == 'pull_request' && github.event.pull_request.draft == false) | |
| defaults: | |
| run: | |
| working-directory: mlflow/R/mlflow | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| repository: ${{ github.event_name == 'schedule' && 'mlflow/mlflow' || null }} | |
| - uses: ./.github/actions/setup-python | |
| - uses: ./.github/actions/setup-pyenv | |
| - uses: ./.github/actions/setup-java | |
| - uses: r-lib/actions/setup-r@bd49c52ffe281809afa6f0fecbf37483c5dd0b93 # v2.11.3 | |
| # This step dumps the current set of R dependencies and R version into files to be used | |
| # as a cache key when caching/restoring R dependencies. | |
| - name: Dump dependencies | |
| run: | | |
| Rscript -e 'source(".dump-r-dependencies.R", echo = TRUE)' | |
| - name: Get OS name | |
| id: os-name | |
| run: | | |
| # `os_name` will be like "Ubuntu-20.04.1-LTS" | |
| os_name=$(lsb_release -ds | sed 's/\s/-/g') | |
| echo "os-name=$os_name" >> $GITHUB_OUTPUT | |
| - name: Cache R packages | |
| uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 | |
| continue-on-error: true | |
| # https://github.com/actions/cache/issues/810 | |
| env: | |
| SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5 | |
| with: | |
| path: ${{ env.R_LIBS_USER }} | |
| # We cache R dependencies based on a tuple of the current OS, the R version, and the list of | |
| # R dependencies | |
| key: ${{ steps.os-name.outputs.os-name }}-${{ hashFiles('mlflow/R/mlflow/R-version') }}-0-${{ hashFiles('mlflow/R/mlflow/depends.Rds') }} | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get install -y libcurl4-openssl-dev libharfbuzz-dev libfribidi-dev libtiff-dev | |
| Rscript -e 'source(".install-deps.R", echo=TRUE)' | |
| - name: Set USE_R_DEVEL | |
| run: | | |
| if [ "$GITHUB_EVENT_NAME" = "schedule" ]; then | |
| USE_R_DEVEL=true | |
| elif [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then | |
| # Use r-devel on a pull request targeted to a release branch | |
| USE_R_DEVEL=$([[ $GITHUB_BASE_REF =~ branch-[0-9]+\.[0-9]+$ ]] && echo true || echo false) | |
| else | |
| # Use r-devel on a push to a release branch | |
| USE_R_DEVEL=$([[ $GITHUB_REF_NAME =~ branch-[0-9]+\.[0-9]+$ ]] && echo true || echo false) | |
| fi | |
| echo "USE_R_DEVEL=$USE_R_DEVEL" >> $GITHUB_ENV | |
| - name: Build package | |
| run: | | |
| ./build-package.sh | |
| - name: Create test environment | |
| run: | | |
| pip install $(git rev-parse --show-toplevel) | |
| H2O_VERSION=$(Rscript -e "print(packageVersion('h2o'))" | grep -Eo '[0-9][0-9.]+') | |
| # test-keras-model.R fails with tensorflow>=2.13.0 | |
| pip install xgboost 'tensorflow<2.13.0' "h2o==$H2O_VERSION" "pydantic<3,>=1.0" "typing_extensions>=4.6.0" | |
| Rscript -e 'source(".install-mlflow-r.R", echo=TRUE)' | |
| - name: Run tests | |
| env: | |
| LINTR_COMMENT_BOT: false | |
| run: | | |
| cd tests | |
| export RETICULATE_PYTHON_BIN=$(which python) | |
| export MLFLOW_SERVER_ENABLE_JOB_EXECUTION=false | |
| Rscript -e 'source("../.run-tests.R", echo=TRUE)' |