Skip to content

Support LLM Inference (vLLM, OpenAI format interface) #870

Support LLM Inference (vLLM, OpenAI format interface)

Support LLM Inference (vLLM, OpenAI format interface) #870

Workflow file for this run

name: Code Testing
on: # rules for when this action will be triggered
pull_request:
branches:
- main
paths-ignore:
- 'docs/**'
- '*.md'
- '*.rst'
- ".github"
workflow_dispatch: # allows triggering a GitHub action manually - see 'Actions' tab
# When this workflow is queued, automatically cancel any previous running
# or pending jobs from the same branch
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
code-testing:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ "ubuntu-latest" ] # TODO: add "windows-latest", "macos-latest" when Docker removed
python-version: ["3.10", "3.11"] # Due to cache limitations, check only the earliest and the latest.
steps:
- name: Check out repository
uses: actions/checkout@v3
#---------------------------------------------------
# Configuring Python environments.
#
# We intentionally commented the `cache` field to remind us not to enable it.
# The reason is that most of the time is spent on package installation rather than package downloading.
# As a result, in the next step, we will cache the complete Python environment, including all pre-installed components.
- name: Set up Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
#cache: 'pip' # Do not activate
- name: Cache Python ${{ matrix.python-version }}
uses: actions/cache@v3
with:
path: ${{ env.pythonLocation }}
key: ${{ matrix.os }}_python-${{ matrix.python-version }}_${{ hashFiles('pyproject.toml', '*/pyproject.toml')}}
#---------------------------------------------------
- name: Install Dependencies
run: python -m pip install .[dev]
- name: Check core imports
run: |
# This job checks that no optional dependencies are imported in the core code.
python -m pip install impall==1.3.1
python -m impall --NO_CLEAR_SYS_MODULES -E 'test**:superduperdb/ext**'
- name: Basic health check
run: |
black --version
ruff --version
mypy --version
- name: Lint and type-check
run: |
make lint-and-type-check
- name: Unit Testing
run: |
make unit-testing PYTEST_ARGUMENTS="--cov=superduperdb --cov-report=xml"
- name: Integration Testing
if: ${{ startsWith(matrix.python-version, '3.11') }} # Dask requires local python and Dockerfile to be in sync
run: |
# Update hostnames
echo 127.0.0.1 mongodb | sudo tee -a /etc/hosts
# Build sandbox image for testing.
make testenv_image
# Run the integrated testing environment
make testenv_init
# Run the test-suite
make integration-testing PYTEST_ARGUMENTS="--cov=superduperdb --cov-report=xml"
# Destroy the testing environment
make testenv_shutdown
# Remove the data directory
sudo rm -rf deploy/testenv/.test_data
- name: Upload code coverage to Codecov
uses: codecov/[email protected]
with:
env_vars: RUNNER_OS,PYTHON_VERSION
file: ./coverage.xml
fail_ci_if_error: false
name: codecov-umbrella