-
Notifications
You must be signed in to change notification settings - Fork 60
143 lines (124 loc) · 5.75 KB
/
ci.yml
File metadata and controls
143 lines (124 loc) · 5.75 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
name: CI
on:
pull_request:
paths-ignore:
- "gtsfm/visualization/**"
workflow_dispatch:
jobs:
test:
name: Unit tests and python checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.1
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "0.9.17"
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y nodejs npm graphviz
- name: Install project dependencies
run: |
uv sync --locked --python 3.12 --all-groups
uv pip install torch-scatter --find-links https://data.pyg.org/whl/torch-2.7.0+cu128.html
- name: Environment setup
run: |
bash .github/scripts/setup.sh
- name: Flake check
run: |
set -e
uv run flake8 --max-line-length 120 --ignore E201,E202,E203,E231,W291,W293,E303,W391,E402,W503,E731 gtsfm tests
- name: Unit tests
run: |
set -e
uv run pytest tests -m "not slow" --durations=0 --cov gtsfm \
--ignore tests/repro_tests \
--ignore tests/loader/test_argoverse_dataset_loader.py \
--ignore tests/runner/test_frontend_runner.py \
--ignore tests/frontend/correspondence_generator/test_mast3r_correspondence_generator.py
uv run coverage report
benchmark:
name: Benchmark
if: ${{ !contains(github.event.pull_request.title, '[skip benchmarks]') }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config_dataset_info: [
[sift , door-12 , 15, JPG, test_data, olsson-loader , 1296, true ],
[lightglue , door-12 , 15, JPG, test_data, olsson-loader , 1296, true ],
[megaloc , door-12 , 15, JPG, test_data, olsson-loader , 1296, true ],
[sift , skydio-8 , 15, jpg, wget , colmap-loader , 760, true ],
[lightglue , skydio-8 , 15, jpg, wget , colmap-loader , 760, true ],
[megaloc , skydio-8 , 15, jpg, wget , colmap-loader , 760, true ],
[sift , skydio-32 , 15, jpg, wget , colmap-loader , 760, true ],
[lightglue , skydio-32 , 15, jpg, wget , colmap-loader , 760, true ],
[megaloc , skydio-32 , 15, jpg, wget , colmap-loader , 760, true ],
[sift , palace-fine-arts-281 ,15, jpg, wget , olsson-loader , 320, true ],
[lightglue , notre-dame-20 , 15, jpg, wget , colmap-loader , 760, false],
[sift , 2011205_rc3 , 15, png, wget , astrovision , 1024, true ],
[lightglue , 2011205_rc3 , 15, png, wget , astrovision , 1024, true ],
[sift , gerrard-hall-100 , 15, jpg, wget , colmap-loader , 760, true ],
[lightglue , gerrard-hall-100 , 15, jpg, wget , colmap-loader , 760, true ],
[sift , south-building-128 , 15, jpg, wget , colmap-loader , 760, true ],
[lightglue , south-building-128 , 15, jpg, wget , colmap-loader , 760, true ],
]
steps:
- uses: actions/checkout@v6.0.1
- name: Cache frontend
uses: actions/cache@v5
env:
CACHE_NUMBER_FRONTEND: 3
with:
path: cache
key: ${{ matrix.config_dataset_info[0] }}-${{ matrix.config_dataset_info[1] }}-${{ matrix.config_dataset_info[2] }}-${{ matrix.config_dataset_info[6] }}-${{ env.CACHE_NUMBER_FRONTEND }}
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "0.9.17"
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y nodejs npm graphviz
- name: Install project dependencies
run: |
uv sync --locked --python 3.12
uv pip install torch-scatter --find-links https://data.pyg.org/whl/torch-2.7.0+cu128.html
- name: Environment setup
run: bash .github/scripts/setup.sh
- name: Prepare dataset
run: |
DATASET_NAME=${{ matrix.config_dataset_info[1] }}
DATASET_SRC=${{ matrix.config_dataset_info[4] }}
bash .github/scripts/download_single_benchmark.sh \
$DATASET_NAME \
$DATASET_SRC
- name: Run GTSFM
run: |
DATASET_NAME=${{ matrix.config_dataset_info[1] }}
CONFIG_NAME=${{ matrix.config_dataset_info[0] }}
MAX_FRAME_LOOKAHEAD=${{ matrix.config_dataset_info[2] }}
LOADER_NAME=${{ matrix.config_dataset_info[5] }}
MAX_RESOLUTION=${{ matrix.config_dataset_info[6] }}
SHARE_INTRINSICS=${{ matrix.config_dataset_info[7] }}
bash .github/scripts/execute_single_benchmark.sh \
$DATASET_NAME \
$CONFIG_NAME \
$MAX_FRAME_LOOKAHEAD \
$LOADER_NAME \
$MAX_RESOLUTION \
$SHARE_INTRINSICS
- name: Archive dataset metrics, plots, and output data
uses: actions/upload-artifact@v5
with:
name: results-${{ matrix.config_dataset_info[0] }}-${{ matrix.config_dataset_info[1] }}-${{ matrix.config_dataset_info[2] }}-${{ matrix.config_dataset_info[3] }}-${{ matrix.config_dataset_info[4] }}-${{ matrix.config_dataset_info[5] }}-${{ matrix.config_dataset_info[6] }}-${{ matrix.config_dataset_info[7] }}.zip
path: |
result_metrics
plots
results
dask_reports