speed up testing #23
Workflow file for this run
This file contains 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: Units Tests - Text Spotting | |
on: [push] | |
# Run linter with github actions for quick feedbacks. | |
jobs: | |
macos_tests: | |
runs-on: macos-latest | |
# run on PRs, or commits to facebookresearch (not internal) | |
strategy: | |
fail-fast: false | |
matrix: | |
torch: ["1.13.1", "2.2.2"] | |
include: | |
- torch: "1.13.1" | |
torchvision: "0.14.1" | |
- torch: "2.2.2" | |
torchvision: "0.17.2" | |
env: | |
# point datasets to ~/.torch so it's cached by CI | |
DETECTRON2_DATASETS: ~/.torch/datasets | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Update pip | |
run: | | |
python -m ensurepip | |
python -m pip install --upgrade pip | |
- name: Install dependencies | |
run: | | |
python -m pip install -U pip | |
python -m pip install wheel ninja opencv-python-headless onnx pytest-xdist | |
python -m pip install numpy==1.26.4 | |
python -m pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} -f https://download.pytorch.org/whl/torch_stable.html | |
# install from github to get latest; install iopath first since fvcore depends on it | |
python -m pip install -U 'git+https://github.com/facebookresearch/iopath' | |
python -m pip install -U 'git+https://github.com/facebookresearch/fvcore' | |
wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py | |
python collect_env.py | |
- name: Build and install | |
run: | | |
CC=clang CXX=clang++ python -m pip install 'git+https://github.com/facebookresearch/detectron2.git' | |
python -m detectron2.utils.collect_env | |
python -m pip install ".[dev]" | |
- name: Install DPText-DETR | |
run: | | |
git clone https://github.com/maps-as-data/DPText-DETR.git | |
python -m pip install 'git+https://github.com/maps-as-data/DPText-DETR.git' # Install DPText-DETR | |
python -m pip install numpy==1.26.4 | |
wget https://huggingface.co/rwood-97/DPText_DETR_ArT_R_50_poly/resolve/main/art_final.pth | |
- name: Run DPText-DETR unittests | |
run: | | |
python -m pytest test_text_spotting/test_dptext_runner.py | |
- name: Install DeepSolo | |
run: | | |
git clone https://github.com/maps-as-data/DeepSolo.git | |
python -m pip install 'git+https://github.com/maps-as-data/DeepSolo.git' # Install DeepSolo | |
python -m pip install numpy==1.26.4 | |
wget https://huggingface.co/rwood-97/DeepSolo_ic15_res50/resolve/main/ic15_res50_finetune_synth-tt-mlt-13-15-textocr.pth | |
- name: Run DeepSolo unittests | |
run: | | |
python -m pytest test_text_spotting/test_deepsolo_runner.py | |
- name: Install MapTextPipeline | |
run: | | |
git clone https://github.com/maps-as-data/MapTextPipeline.git | |
python -m pip install 'git+https://github.com/maps-as-data/MapTextPipeline.git' # Install MapTextPipeline | |
python -m pip install "numpy<2.0.0" | |
wget https://huggingface.co/rwood-97/MapTextPipeline_rumsey/resolve/main/rumsey-finetune.pth | |
- name: Run MapTextPipeline unittests | |
run: | | |
python -m pytest test_text_spotting/test_maptext_runner.py |