-
Notifications
You must be signed in to change notification settings - Fork 4
71 lines (68 loc) · 1.92 KB
/
Copy pathci.yml
File metadata and controls
71 lines (68 loc) · 1.92 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
name: CI
on:
push:
branches:
- main
paths:
- 'src/**'
- 'tests/**'
- '.github/**'
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- name: Install the project
run: uv sync --locked --all-extras --dev
#
- name: Cache libtorch
id: cache-libtorch
uses: actions/cache@v4
with:
path: libtorch
key: libtorch-${{ runner.os }}-1.13.1-cxx11-shared-cpu
- name: Download libtorch (CPU)
if: steps.cache-libtorch.outputs.cache-hit != 'true'
run: |
set -eux
url="https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-1.13.1%2Bcpu.zip"
curl -L "$url" -o libtorch.zip
unzip -q libtorch.zip
rm libtorch.zip
#
- name: Pytest
env:
CMAKE_PREFIX_PATH: ${{ github.workspace }}/libtorch
run: |
uv run pytest -s -m "not lagat"
#
- name: Collect raw data
run: uv run python scripts/collect_expert_trajectories.py
- name: Create dataset
run: uv run python scripts/convert_to_imitation_dataset.py
- name: Train model
run: uv run python scripts/train.py
- name: Evaluate model
run: uv run python scripts/eval_model.py
#
- name: Build C++ LaGAT
env:
CMAKE_PREFIX_PATH: ${{ github.workspace }}/libtorch
run: |
scripts/build_cpp.sh --planner-lagat
- name: Run planner
run: |
latest=$(ls -t outputs/train/ | tail -1)
build/lagat/main \
-v 3 \
-m assets/empty-8-8.map \
-o result.txt \
-t 10 \
-N 2 \
--model outputs/train/$latest/loss_best_jit.pt