Team Ai
Apppublic

Arulkumar03/Wheat_HEAD_Detection_Counting_ComputerVision_Model

sourceHugging Facemitupdated 3y agoView on Hugging Face
0likes
workflow.yml82 linesDownload Raw Back to workflows
1name: CI2on: [push, pull_request]3 4# Run linter with github actions for quick feedbacks.5# Run macos tests with github actions. Linux (CPU & GPU) tests currently runs on CircleCI6jobs:7  linter:8    runs-on: ubuntu-latest9    # run on PRs, or commits to facebookresearch (not internal)10    if: ${{ github.repository_owner == 'facebookresearch' || github.event_name == 'pull_request' }}11    steps:12      - uses: actions/checkout@v213      - name: Set up Python 3.914        uses: actions/setup-python@v215        with:16          python-version: 3.917      - name: Install dependencies18        # flake8-bugbear flake8-comprehensions are useful but not available internally19        run: |20          python -m pip install --upgrade pip21          python -m pip install flake8==3.8.1 isort==4.3.2122          python -m pip install black==22.3.023          flake8 --version24      - name: Lint25        run: |26          echo "Running isort"27          isort -c -sp .28          echo "Running black"29          black -l 100 --check .30          echo "Running flake8"31          flake8 .32 33  macos_tests:34    runs-on: macos-latest35    # run on PRs, or commits to facebookresearch (not internal)36    if: ${{ github.repository_owner == 'facebookresearch' || github.event_name == 'pull_request' }}37    strategy:38      fail-fast: false39      matrix:40        torch: ["1.8", "1.9", "1.10"]41        include:42          - torch: "1.8"43            torchvision: 0.944          - torch: "1.9"45            torchvision: "0.10"46          - torch: "1.10"47            torchvision: "0.11.1"48    env:49      # point datasets to ~/.torch so it's cached by CI50      DETECTRON2_DATASETS: ~/.torch/datasets51    steps:52      - name: Checkout53        uses: actions/checkout@v254      - name: Set up Python 3.855        uses: actions/setup-python@v256        with:57          python-version: 3.858      - name: Cache dependencies59        uses: actions/cache@v260        with:61          path: |62            ${{ env.pythonLocation }}/lib/python3.8/site-packages63            ~/.torch64          key: ${{ runner.os }}-torch${{ matrix.torch }}-${{ hashFiles('setup.py') }}-2022011965 66      - name: Install dependencies67        run: |68          python -m pip install -U pip69          python -m pip install ninja opencv-python-headless onnx pytest-xdist70          python -m pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} -f https://download.pytorch.org/whl/torch_stable.html71          # install from github to get latest; install iopath first since fvcore depends on it72          python -m pip install -U 'git+https://github.com/facebookresearch/iopath'73          python -m pip install -U 'git+https://github.com/facebookresearch/fvcore'74 75      - name: Build and install76        run: |77          CC=clang CXX=clang++ python -m pip install -e .[all]78          python -m detectron2.utils.collect_env79          ./datasets/prepare_for_tests.sh80      - name: Run unittests81        run: python -m pytest -n 4 --durations=15 -sv tests/82