-
Notifications
You must be signed in to change notification settings - Fork 12
82 lines (68 loc) · 2.63 KB
/
mr_ci_text_spotting.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
---
name: Units Tests - Text Spotting
on: [push]
# Run linter with github actions for quick feedbacks.
jobs:
all_tests:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
fail-fast: false
env:
# point datasets to ~/.torch so it's cached by CI
DETECTRON2_DATASETS: ~/.torch/datasets
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Install ninja-build tool
uses: seanmiddleditch/gha-setup-ninja@v5
with:
version: 1.12.1
- name: Update pip
run: |
python -m ensurepip
python -m pip install --upgrade pip
- name: Install dependencies
run: |
python -m pip install wheel
python -m pip install numpy==1.26.4 torch==2.2.2 torchvision==0.17.2 -f https://download.pytorch.org/whl/torch_stable.html
python -m pip install ".[dev]"
python -m pip install pytest-cov
python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
python -m pip install 'git+https://github.com/maps-as-data/DeepSolo.git'
python -m pip install 'git+https://github.com/maps-as-data/DPText-DETR.git'
python -m pip install 'git+https://github.com/maps-as-data/MapTextPipeline.git'
- name: Clone DPText-DETR
run: |
git clone https://github.com/maps-as-data/DPText-DETR.git
- name: Clone DeepSolo
run: |
git clone https://github.com/maps-as-data/DeepSolo.git
- name: Clone MapTextPipeline
run: |
git clone https://github.com/maps-as-data/MapTextPipeline.git
- name: Hugging Face CLI
run: |
pip install -U "huggingface_hub[cli]"
huggingface-cli download rwood-97/DPText_DETR_ArT_R_50_poly art_final.pth --local-dir .
huggingface-cli download rwood-97/DeepSolo_ic15_res50 ic15_res50_finetune_synth-tt-mlt-13-15-textocr.pth --local-dir .
huggingface-cli download rwood-97/MapTextPipeline_rumsey rumsey-finetune.pth --local-dir .
- name: Test with pytest
run: |
python -m pytest --cov=./ --cov-report=xml ./tests
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage/reports/
env_vars: OS,PYTHON
fail_ci_if_error: false
files: ./coverage.xml,!./cache
flags: unittests
name: codecov-umbrella