Skip to content

Commit 428cee2

Browse files
author
Benedikt Mersch
authored
Add CI (#42)
1 parent 2c51b5a commit 428cee2

28 files changed

+124
-67
lines changed

.github/workflows/pre-commit.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Style Check
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
9+
jobs:
10+
pre-commit:
11+
name: Pre-commit checks
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- uses: actions/setup-python@v4
16+
with:
17+
python-version: "3.10"
18+
- uses: pre-commit/[email protected]

.github/workflows/python.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Python API
2+
on:
3+
push:
4+
branches: ["main"]
5+
pull_request:
6+
branches: ["main"]
7+
8+
jobs:
9+
python_package:
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
matrix:
13+
os: [ubuntu-22.04, ubuntu-20.04]
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Setup Python3
18+
uses: actions/setup-python@v3
19+
- name: Install dependencies
20+
run: python -m pip install --upgrade pip
21+
- name: Build pip package
22+
run: python -m pip install --verbose .
23+
- name: Test installation
24+
run: mos4d_pipeline --help

.pre-commit-config.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.4.0
4+
hooks:
5+
- id: trailing-whitespace
6+
exclude: \.patch$
7+
- id: end-of-file-fixer
8+
exclude: \.patch$
9+
- id: check-yaml
10+
- id: check-added-large-files
11+
- repo: https://github.com/psf/black
12+
rev: 23.1.0
13+
hooks:
14+
- id: black
15+
- repo: https://github.com/pycqa/isort
16+
rev: 5.12.0
17+
hooks:
18+
- id: isort

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ mos4d_pipeline --help
6060
```
6161
to see how to run 4DMOS.
6262

63-
Check the [Download](#downloads) section for a pre-trained model. Like [KISS-ICP](https://github.com/PRBonn/kiss-icp), our pipeline runs on a variety of point cloud data formats like `bin`, `pcd`, `ply`, `xyz`, `rosbags`, and more. To visualize these, just type
63+
Check the [Download](#downloads) section for a pre-trained model. Like [KISS-ICP](https://github.com/PRBonn/kiss-icp), our pipeline runs on a variety of point cloud data formats like `bin`, `pcd`, `ply`, `xyz`, `rosbags`, and more. To visualize these, just type
6464

6565
```bash
6666
mos4d_pipeline --visualize /path/to/weights.ckpt /path/to/data

config/apollo.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
data:
2-
deskew: False
2+
deskew: False
33

44
mos:
55
max_range_mos: -1.0 # No limit

config/kitti-tracking.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
data:
2-
deskew: True
2+
deskew: True
33

44
mos:
55
max_range_mos: -1.0 # No limit

config/kitti.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
data:
2-
deskew: False
2+
deskew: False
33

44
mos:
55
max_range_mos: -1.0 # No limit

scripts/cache_to_ply.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@
2121
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
# SOFTWARE.
2323

24-
import os
25-
import typer
2624
import importlib
25+
import os
26+
from pathlib import Path
27+
from typing import List, Optional
2728

2829
import numpy as np
2930
import torch
30-
from typing import List, Optional
31+
import typer
3132
from torch.utils.data import DataLoader
3233
from tqdm import tqdm
33-
from pathlib import Path
3434

35-
from mos4d.datasets.mos4d_dataset import MOS4DDataset, collate_fn
3635
from mos4d.config import load_config
36+
from mos4d.datasets.mos4d_dataset import MOS4DDataset, collate_fn
3737

3838

3939
def cache_to_ply(

scripts/precache.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@
2121
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
# SOFTWARE.
2323

24-
from tqdm import tqdm
2524
from pathlib import Path
2625
from typing import List, Optional
26+
2727
import typer
28+
from tqdm import tqdm
2829

2930
from mos4d.config import load_config
3031

@@ -62,8 +63,9 @@ def precache(
6263
),
6364
):
6465
from torch.utils.data import DataLoader
65-
from mos4d.datasets.mos4d_dataset import collate_fn
66+
6667
from mos4d.datasets.mos4d_dataset import MOS4DDataset as Dataset
68+
from mos4d.datasets.mos4d_dataset import collate_fn
6769

6870
cfg = load_config(config)
6971
sequences = list(sequence) if len(sequence) > 0 else cfg.training.train + cfg.training.val

scripts/train.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,17 @@
2222
# SOFTWARE.
2323

2424
import os
25+
from pathlib import Path
26+
from typing import Optional
27+
2528
import torch
2629
import typer
27-
from typing import Optional
28-
from pathlib import Path
2930
from pytorch_lightning import Trainer
3031
from pytorch_lightning import loggers as pl_loggers
3132
from pytorch_lightning.callbacks import LearningRateMonitor, ModelCheckpoint
3233

33-
from mos4d.utils.seed import set_seed
3434
from mos4d.config import load_config
35+
from mos4d.utils.seed import set_seed
3536

3637

3738
def train(

0 commit comments

Comments
 (0)