👷 Bump astral-sh/setup-uv from 7.1.4 to 7.1.6 #113
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: MMDet CI | |
| # on: | |
| # workflow_dispatch: | |
| # push: | |
| # branches: [main] | |
| # paths: | |
| # # Core MMDet implementation files | |
| # - "sahi/models/mmdet.py" | |
| # - "sahi/utils/mmdet.py" | |
| # # Test files that run MMDet tests | |
| # - "tests/test_mmdetectionmodel.py" | |
| # - "tests/test_predict.py" | |
| # # Files that integrate/register MMDet | |
| # - "sahi/auto_model.py" | |
| # - "sahi/models/__init__.py" | |
| # - "sahi/utils/import_utils.py" | |
| # # Base classes that MMDet depends on | |
| # - "sahi/models/base.py" | |
| # - "sahi/predict.py" | |
| # - "sahi/postprocess/**" | |
| # # Workflow and dependency files | |
| # - ".github/workflows/mmdet.yml" | |
| # - "pyproject.toml" | |
| # # Test data/configs used by MMDet tests | |
| # - "tests/data/models/mmdet/**" | |
| # - "tests/data/models/mmdet_*/**" | |
| # pull_request: | |
| # branches: [main] | |
| # paths: | |
| # # Core MMDet implementation files | |
| # - "sahi/models/mmdet.py" | |
| # - "sahi/utils/mmdet.py" | |
| # # Test files that run MMDet tests | |
| # - "tests/test_mmdetectionmodel.py" | |
| # - "tests/test_predict.py" | |
| # # Files that integrate/register MMDet | |
| # - "sahi/auto_model.py" | |
| # - "sahi/models/__init__.py" | |
| # - "sahi/utils/import_utils.py" | |
| # # Base classes that MMDet depends on | |
| # - "sahi/models/base.py" | |
| # - "sahi/predict.py" | |
| # - "sahi/postprocess/**" | |
| # # Workflow and dependency files | |
| # - ".github/workflows/mmdet.yml" | |
| # - "pyproject.toml" | |
| # # Test data/configs used by MMDet tests | |
| # - "tests/data/models/mmdet/**" | |
| # - "tests/data/models/mmdet_*/**" | |
| # jobs: | |
| # mmdet-tests: | |
| # runs-on: ubuntu-latest | |
| # strategy: | |
| # matrix: | |
| # python-version: ["3.11"] # Only test on Python 3.11 | |
| # steps: | |
| # - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| # - name: Setup uv python package manager | |
| # uses: astral-sh/setup-uv@1e862dfacbd1d6d858c55d9b792c756523627244 # v7.1.4 | |
| # with: | |
| # python-version: ${{ matrix.python-version }} | |
| # enable-cache: true | |
| # prune-cache: false | |
| # cache-dependency-glob: | | |
| # **/pyproject.toml | |
| # - name: Cache model weights | |
| # uses: actions/cache@v4 | |
| # with: | |
| # path: tests/data/models | |
| # key: ${{ runner.os }}-models-${{ hashFiles('sahi/utils/mmdet.py') }} | |
| # restore-keys: | | |
| # ${{ runner.os }}-models- | |
| # - name: Install libgl | |
| # run: sudo apt-get update && sudo apt-get install -y libgl1 | |
| # - name: Install dependencies | |
| # run: | | |
| # set -e | |
| # # Create virtual environment with Python 3.11 | |
| # uv venv --python 3.11 | |
| # # Activate virtual environment | |
| # source .venv/bin/activate | |
| # # Install dev and mmdet dependencies | |
| # uv sync --group dev --extra mmdet | |
| # # Install specific torch version for MMDet compatibility AFTER uv sync | |
| # uv pip install torch==2.1.2+cpu torchvision==0.16.2+cpu --index-url https://download.pytorch.org/whl/cpu | |
| # - name: Verify .venv Activation | |
| # run: | | |
| # if [ ! -d ".venv" ]; then | |
| # echo ".venv directory not found" | |
| # exit 1 | |
| # fi | |
| # source .venv/bin/activate | |
| # - name: Run MMDet tests | |
| # run: | | |
| # source .venv/bin/activate | |
| # pytest tests/test_mmdetection_model.py -n auto | |
| # # Run MMDet-related tests from test_predict.py | |
| # pytest tests/test_predict.py::test_get_prediction_mmdet -n auto | |
| # pytest tests/test_predict.py::test_get_sliced_prediction_mmdet -n auto | |
| # pytest tests/test_predict.py::test_mmdet_yolox_tiny_prediction -n auto | |
| # - name: Test SAHI CLI with MMDet | |
| # run: | | |
| # source .venv/bin/activate | |
| # set -e | |
| # sahi predict --model_type mmdet --source tests/data/ --novisual --model_path tests/data/models/mmdet/yolox/yolox_tiny_8x8_300e_coco_20211124_171234-b4047906.pth --model_config_path tests/data/models/mmdet/yolox/yolox_tiny_8xb8-300e_coco.py --image_size 320 | |
| # sahi predict --model_type mmdet --source tests/data/coco_utils/terrain1.jpg --export_pickle --export_crop --model_path tests/data/models/mmdet/yolox/yolox_tiny_8x8_300e_coco_20211124_171234-b4047906.pth --model_config_path tests/data/models/mmdet/yolox/yolox_tiny_8xb8-300e_coco.py --image_size 320 | |
| # sahi predict --model_type mmdet --source tests/data/coco_utils/ --novisual --dataset_json_path tests/data/coco_utils/combined_coco.json --model_path tests/data/models/mmdet/yolox/yolox_tiny_8x8_300e_coco_20211124_171234-b4047906.pth --model_config_path tests/data/models/mmdet/yolox/yolox_tiny_8xb8-300e_coco.py --image_size 320 |