feat: server side prefetch #398
Workflow file for this run
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: Tests | |
| on: | |
| push: | |
| branches: [main, release/*] | |
| paths: | |
| - 'lavender_data/**' | |
| - 'tests/**' | |
| - 'pyproject.toml' | |
| - 'poetry.lock' | |
| pull_request: | |
| branches: [main, release/*] | |
| paths: | |
| - '.github/workflows/tests.yml' | |
| - 'lavender_data/**' | |
| - 'tests/**' | |
| - 'pyproject.toml' | |
| - 'poetry.lock' | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.10', '3.11', '3.12', '3.13'] | |
| container: python:${{ matrix.python-version }}-slim-bookworm | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Install Poetry | |
| uses: snok/install-poetry@v1 | |
| with: | |
| version: '1.8.5' | |
| - name: Load cached venv | |
| id: cached-poetry-dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: .venv | |
| key: lavender-data-venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
| - name: Install dependencies | |
| run: | | |
| apt-get update | |
| apt-get install -y curl | |
| poetry install --no-interaction | |
| # tensor serialization tests | |
| poetry run pip install torch --index-url https://download.pytorch.org/whl/cpu | |
| # s3 storage tests | |
| poetry run pip install boto3 tqdm | |
| # converter tests | |
| poetry run pip install webdataset pillow | |
| - name: Run tests | |
| run: | | |
| poetry run python -m unittest discover -s tests -p 'test_*.py' | |
| env: | |
| LAVENDER_DATA_MODULES_DIR: '' | |
| - name: Server logs on failure | |
| if: ${{ failure() || cancelled() }} | |
| run: | | |
| if [ -f test.log ]; then | |
| cat test.log | |
| else | |
| echo "No test log found" | |
| fi |