Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
260 commits
Select commit Hold shift + click to select a range
932360c
Merge pull request #27 from vcharraut/dev/ruff
vcharraut Sep 9, 2025
348e89d
Basic getting started docs
daphne-cornelisse Sep 9, 2025
4208808
Merge branch 'main' into docs/getting_started
daphne-cornelisse Sep 9, 2025
70a2da7
Merge branch 'main' of https://github.com/Emerge-Lab/PufferLib into d…
daphne-cornelisse Sep 9, 2025
5d3f69f
Merge branch 'docs/getting_started' of https://github.com/Emerge-Lab/…
daphne-cornelisse Sep 9, 2025
8afeb76
Minor improvements
daphne-cornelisse Sep 9, 2025
a7a5bf3
.gitignore data files
daphne-cornelisse Sep 9, 2025
ce43a67
Update readme
daphne-cornelisse Sep 9, 2025
b20a470
Ignore data files
daphne-cornelisse Sep 9, 2025
f550ba7
Merge pull request #29 from Emerge-Lab/docs/getting_started
daphne-cornelisse Sep 9, 2025
6b878e8
Prevent segfault for maps
daphne-cornelisse Sep 10, 2025
3aeb7ee
Merge pull request #31 from Emerge-Lab/fix/validate_maps
daphne-cornelisse Sep 11, 2025
96c5fb3
Add continuous space support for action
vcharraut Sep 11, 2025
8e6ae15
Update action_type configuration and improve error message for action…
vcharraut Sep 11, 2025
3989080
raylib_vis rollout and obs rollout
l1onh3art88 Sep 11, 2025
d999553
small change
l1onh3art88 Sep 11, 2025
7437468
removed trackign diamond in snapshot mode
l1onh3art88 Sep 11, 2025
aed9387
merge conflicts fixed and pulled in main
l1onh3art88 Sep 11, 2025
ca81ba8
Merge pull request #36 from Emerge-Lab/raylib_vis
daphne-cornelisse Sep 11, 2025
981b369
Add docs
daphne-cornelisse Sep 11, 2025
3274ea1
Merge pull request #37 from Emerge-Lab/docs/vis
daphne-cornelisse Sep 11, 2025
139f751
Integrate raylib visualization with wandb training
daphne-cornelisse Sep 11, 2025
28c9851
Remove unnessary env code.
daphne-cornelisse Sep 11, 2025
9d85786
Delete drive
daphne-cornelisse Sep 11, 2025
6407bbf
Reduce scale to 4.0 for faster rendering.
daphne-cornelisse Sep 11, 2025
fa1d075
Revert "Delete drive"
daphne-cornelisse Sep 11, 2025
9933432
Ensure drive binary is built at initialization.
daphne-cornelisse Sep 11, 2025
6b211ec
Update gitignore
daphne-cornelisse Sep 11, 2025
9c52d01
Delete puffer_drive_weights.bin
daphne-cornelisse Sep 11, 2025
16973ec
Delete drive
daphne-cornelisse Sep 11, 2025
ab5a6d7
Reset params to origin
daphne-cornelisse Sep 11, 2025
897cf0f
Minor
daphne-cornelisse Sep 11, 2025
6a5c500
Decrease default render freq.
daphne-cornelisse Sep 11, 2025
fccad66
Update gitignore
daphne-cornelisse Sep 11, 2025
ad5cdee
Add back example gif and weights
daphne-cornelisse Sep 11, 2025
1facf99
Merge pull request #38 from Emerge-Lab/feat/raylib_wandb
daphne-cornelisse Sep 11, 2025
26fad2f
log trajectories and rollout trajectories
l1onh3art88 Sep 11, 2025
fcec959
puleld in main
l1onh3art88 Sep 11, 2025
cea63a4
Refactor actions to use float pointer for continuous action represent…
vcharraut Sep 12, 2025
5046cf5
Merge pull request #33 from vcharraut/dev/continuous-action-space
vcharraut Sep 12, 2025
937b27f
Update rendering configuration to use values from the config file
vcharraut Sep 12, 2025
978c529
Merge pull request #40 from vcharraut/fix/render_params
vcharraut Sep 12, 2025
593f644
Add agent status array
vcharraut Sep 12, 2025
20e2183
Minor
daphne-cornelisse Sep 14, 2025
b0ed679
Linting
daphne-cornelisse Sep 14, 2025
e157c4d
Merge pull request #39 from Emerge-Lab/raylib_vis
daphne-cornelisse Sep 14, 2025
6b764ed
Enable rendering world state and agent view during training (#42)
daphne-cornelisse Sep 14, 2025
6906270
Merge branch 'main' into dev/agent_status
vcharraut Sep 15, 2025
5dfcb25
Rename agent_status -> metrics_array
vcharraut Sep 15, 2025
ebc5e86
Remove reached_goal field and update metrics_array usage
vcharraut Sep 15, 2025
c310ecc
Change move_expert function parameter type from int* to float*
vcharraut Sep 15, 2025
6838d4e
Add lane alignment metric to Entity and update related functions
vcharraut Sep 15, 2025
bdcbcb4
Fix M_PI definition to ensure consistency in global constants
vcharraut Sep 15, 2025
97000b2
Add changes from main
vcharraut Sep 15, 2025
e4778a2
Fix spacing
vcharraut Sep 15, 2025
7af16ba
Isolate collision_check
vcharraut Sep 15, 2025
af898cb
Remove collided_with_index from Entity and related functions to simpl…
vcharraut Sep 15, 2025
f22d3df
Remove unnecessary metrics assignment in compute_agent_metrics function
vcharraut Sep 15, 2025
54954a5
Replacing hardcoded indices with defined constants in drive.h
vcharraut Sep 15, 2025
2977af9
Add lane alignment rate to logging metrics
vcharraut Sep 15, 2025
0907b88
Refactor collision indicator in compute_observations to use collision…
vcharraut Sep 15, 2025
a01bb7c
Improve visualization aesthetics & flexibility (#43)
daphne-cornelisse Sep 15, 2025
21b3438
Remove redundant metrics assignment in compute_agent_metrics function
vcharraut Sep 15, 2025
1ddfa33
Remove lane alignment metric from reward
vcharraut Sep 15, 2025
2a9c9df
Remove comment
vcharraut Sep 15, 2025
08e6758
Merge pull request #41 from vcharraut/dev/agent_status
vcharraut Sep 15, 2025
2d15ac6
initial commit, added xodr processing scripts, map analysis notebook
mpragnay Sep 15, 2025
4601dec
strip jupyter notebook execution results
mpragnay Sep 16, 2025
5f18a9a
Merge pull request #45 from Emerge-Lab/carla_map_utils
mpragnay Sep 16, 2025
f69b316
Apply ruff formatting
vcharraut Sep 17, 2025
e9e28ba
Add pre-commit job to GitHub Actions workflow
vcharraut Sep 17, 2025
7460a0d
Merge pull request #48 from vcharraut/dev/app-pre-commit-workflow
vcharraut Sep 17, 2025
6d0d7cc
Add ADE to human logs as metric and configurable reward (#51)
daphne-cornelisse Sep 17, 2025
d4a7d7b
Temporarily disable lane check. (#53)
daphne-cornelisse Sep 17, 2025
4f60a4d
Update README.md with Render Dependencies (#55)
mpragnay Sep 18, 2025
97d1707
Fix lane_alignment metrics and add heading checks for the closest roa…
vcharraut Sep 19, 2025
bcd9e43
Add safe lane check (#57)
daphne-cornelisse Sep 20, 2025
759a439
Add CI rendering test (#58)
daphne-cornelisse Sep 21, 2025
8fd777e
Small rendering improvements (#60)
daphne-cornelisse Sep 21, 2025
9c05287
Let's actually pass in map_name via cmd line + frame_skip = 3 by defa…
daphne-cornelisse Sep 21, 2025
7c05d70
Feat/argument parsing (#56)
aje-valeo Sep 22, 2025
d2b116e
Fix missing ini_file arg that leads training runs to fail (#65)
daphne-cornelisse Sep 22, 2025
699f4fa
Add test that launches training job (#66)
daphne-cornelisse Sep 22, 2025
939900a
replaced deprecated dependency (#67)
nadarenator Sep 23, 2025
f82cf41
Visualize goal radius and make configurable (#70)
daphne-cornelisse Sep 24, 2025
7863d47
Error Handling support added
Sep 26, 2025
a954ecd
Fixed trailing whitespaces, newline
Sep 26, 2025
75a9636
Fixed end of file whitespaces
Sep 26, 2025
62f94bc
include quotes fixes
Sep 26, 2025
a29f46b
Merge pull request #71 from Emerge-Lab/Add-Error-Handling
mpragnay Sep 28, 2025
f9aea39
Fixed drive build issues in Linux (#73)
mpragnay Sep 30, 2025
27b647e
Speed up headless rendering (#72)
daphne-cornelisse Oct 2, 2025
77f7288
Added Town01 with no junction road edges (#81)
mpragnay Oct 14, 2025
1368495
Added performance test
Aditya-Gupta26 Oct 16, 2025
c72f97a
Adding performance test
Aditya-Gupta26 Oct 16, 2025
d619b13
Updated performance check criteria
Aditya-Gupta26 Oct 16, 2025
7e54dc8
Updates
Aditya-Gupta26 Oct 16, 2025
1dc1d45
Integrate agent selection flags with ini-driven drive binding
julianh65 Sep 24, 2025
a5a9fe3
Avoid applying selection flags in binding.shared scratch env
julianh65 Sep 24, 2025
c3ddc90
Visualize goal radius and make configurable (#70)
julianh65 Oct 4, 2025
4b7736a
Speed up headless rendering (#72)
daphne-cornelisse Oct 2, 2025
e9d2d27
Integrate agent selection flags with ini-driven drive binding
julianh65 Sep 24, 2025
c4225b6
ignore artifacts and .pt files
julianh65 Oct 4, 2025
0b71ec6
clean up
julianh65 Oct 4, 2025
b683976
clean up
julianh65 Oct 4, 2025
d49b681
fix merge
julianh65 Oct 4, 2025
4da310c
max agents safety
julianh65 Oct 6, 2025
c332324
fixes
julianh65 Oct 6, 2025
51d9b57
binding: keep shared() scratch env lightweight for n_policy=1
julianh65 Oct 18, 2025
d0f3d2a
PR cleanup: remove artifacts and drive outputs, restore weights
julianh65 Oct 18, 2025
14e66c6
revert artifacts and test logic
julianh65 Oct 18, 2025
a8df8dd
cleanup
julianh65 Oct 18, 2025
5ea4624
restore
julianh65 Oct 18, 2025
032beb9
Cleanup storage so that tests work again (#87)
daphne-cornelisse Oct 19, 2025
2b7def7
Merge branch 'main' into jhunt/human_replay_training
julianh65 Oct 19, 2025
8f30c64
update drive.ini
julianh65 Oct 19, 2025
d1e24fa
Spatial hashing (#77)
mpragnay Oct 19, 2025
709bf44
Add goal generation alternative (#76)
vcharraut Oct 20, 2025
fdfa227
Enable control of all kinds of agent types (#84)
daphne-cornelisse Oct 20, 2025
8597a6b
Add support for resetting agents to any time step on the log trajecto…
daphne-cornelisse Oct 20, 2025
973b39b
Updated for main PR push
Aditya-Gupta26 Oct 20, 2025
afff4e3
fix ini
julianh65 Oct 21, 2025
c7352b7
merge resolve conflicts, fix render selection
julianh65 Oct 21, 2025
c316bd6
revert ini
julianh65 Oct 21, 2025
5d60604
more cleaning
julianh65 Oct 21, 2025
16f3f45
cleaning
julianh65 Oct 21, 2025
9f843ef
remove trailing whitespace
julianh65 Oct 21, 2025
ee8996f
Merge pull request #62 from Emerge-Lab/jhunt/human_replay_training
julianh65 Oct 21, 2025
d6f8b2e
fix metrics not showing (#93)
julianh65 Oct 22, 2025
09f4561
Remove legacy code (#94)
vcharraut Oct 22, 2025
93b5c17
Updated to test for hardcoded baseline mean
Aditya-Gupta26 Oct 22, 2025
8248b75
Fix bugs
Aditya-Gupta26 Oct 22, 2025
502ba75
Fix bugs
Aditya-Gupta26 Oct 22, 2025
b3a8e23
Fix bugs
Aditya-Gupta26 Oct 22, 2025
e523a5b
Fix bugs
Aditya-Gupta26 Oct 22, 2025
15152f1
Fix bugs
Aditya-Gupta26 Oct 22, 2025
ad80ed8
Updated file
Aditya-Gupta26 Oct 23, 2025
b6d573c
Updated file
Aditya-Gupta26 Oct 23, 2025
a51587d
Updated files for Main PR only
Aditya-Gupta26 Oct 23, 2025
4026728
Further edits
Aditya-Gupta26 Oct 24, 2025
5ac6a5b
Visualization refactor (#95)
m2kulkarni Oct 24, 2025
fe20bf0
Add weights back (#99)
daphne-cornelisse Oct 26, 2025
3f68f70
Configurable Scenario Length (#102)
julianh65 Oct 26, 2025
19a5232
MAJOR: gelu in puffernet was slightly off, silently corrupting demo/e…
jsuarez5341 Oct 26, 2025
8d0f4ea
Drive demo (#101)
jsuarez5341 Oct 26, 2025
7c83b2b
Improve train perf metrics (#91)
daphne-cornelisse Oct 28, 2025
7a2509c
Merge branch 'main' into agupta/add-performance-tests
eugenevinitsky Oct 29, 2025
f38dfc9
Fix broken visualizer and add original weights back in (#105)
daphne-cornelisse Oct 29, 2025
f1724b5
Merge branch 'main' into agupta/add-performance-tests
Aditya-Gupta26 Oct 30, 2025
9eb2408
Add scenario_length parameter to Drive initialization
Aditya-Gupta26 Oct 30, 2025
f07fbb8
Fix formatting of scenario_length parameter
Aditya-Gupta26 Oct 30, 2025
2f4abfb
Merge pull request #92 from Emerge-Lab/agupta/add-performance-tests
eugenevinitsky Oct 30, 2025
c5e6b58
GigaFlow Dynamics (#83)
nadarenator Oct 30, 2025
3d1ae8b
Make the action parsing correctly catch discrete. Only catches "discr…
eugenevinitsky Nov 2, 2025
dc596c4
tiny default fix (#111)
daphne-cornelisse Nov 2, 2025
1244fbf
Add continuous scaling
Nov 3, 2025
2dbaa40
Merge pull request #113 from Victorbares/fix_scaling_continuous
eugenevinitsky Nov 3, 2025
48c3388
initial commit
julianh65 Nov 4, 2025
bdf4545
Merge pull request #115 from Emerge-Lab/jhunt/stop_vecenv_closing
eugenevinitsky Nov 4, 2025
9adbb57
Fixing Issues with failing tests (#117)
Aditya-Gupta26 Nov 5, 2025
1278b9e
Add stop and remove collision behaviors (#97)
Aditya-Gupta26 Nov 5, 2025
ce5452f
Refactoring Goal Behaviour to add STOP condition (#108)
Aditya-Gupta26 Nov 6, 2025
37ee27f
Waymo Open Sim Agent Challenge (WOSAC) evaluation (#80)
daphne-cornelisse Nov 8, 2025
740057c
Minor fixes and safeguard (#122)
daphne-cornelisse Nov 8, 2025
269e7a7
docs for vscode debugger setup (#123)
riccardosavorgnan Nov 10, 2025
a6ee4a4
Goal behavior fixes (#124)
daphne-cornelisse Nov 11, 2025
c75b549
Update drive.h
eugenevinitsky Nov 13, 2025
d130cad
Add mode to only control the self-driving car (SDC) (#130)
daphne-cornelisse Nov 13, 2025
c26b245
Merge pull request #129 from Emerge-Lab/eugenevinitsky-patch-1
eugenevinitsky Nov 14, 2025
fecbb2d
Fix incorrect obs dim in draw_agent_obs (#109)
eugenevinitsky Nov 15, 2025
0439aa5
Replace product distribution action space with joint distribution (#104)
eugenevinitsky Nov 16, 2025
97dcb3d
Replace default ent_coef and learning_rate hparams (#134)
daphne-cornelisse Nov 16, 2025
040d39d
Add new weights binary with joint action space. (#136)
daphne-cornelisse Nov 18, 2025
058adff
Add support for logging optional evals during training (#133)
daphne-cornelisse Nov 18, 2025
7317d4f
Test for ini parsing (python and C) (#116)
aje-valeo Nov 20, 2025
c697f17
Fix missing arg (#141)
daphne-cornelisse Nov 20, 2025
2d30fa3
Add WOSAC interaction + map metrics. Switch from np -> torch. (#138)
WaelDLZ Nov 21, 2025
f8021df
Multi map render support to wandb (#143)
mpragnay Nov 24, 2025
87033d0
Add mode for controlled experiments (#144)
daphne-cornelisse Nov 24, 2025
aef6501
Little optimizations to use less memory in interaction_features.py (#…
daphne-cornelisse Nov 24, 2025
8690940
Fix broken link
daphne-cornelisse Nov 24, 2025
9d6a311
Data processing script that works decent. (#150)
daphne-cornelisse Nov 25, 2025
99060ba
Pass `map_dir` to the env via `.ini` and enable evaluation on a diffe…
daphne-cornelisse Nov 25, 2025
6eaea31
Add sprites in headless rendering (#152)
daphne-cornelisse Nov 26, 2025
a6af21c
Faster file processing (#153)
nadarenator Nov 27, 2025
6ce4879
Add link to small clean eval dataset
daphne-cornelisse Nov 27, 2025
0eab9bd
Fix link typo
daphne-cornelisse Nov 27, 2025
225ef99
Gif for readme (#155)
daphne-cornelisse Nov 27, 2025
f44573e
Fix link?
daphne-cornelisse Nov 27, 2025
b11d5e1
Fix vertical spaces.
daphne-cornelisse Nov 27, 2025
9c8b017
Update README.md
daphne-cornelisse Nov 27, 2025
eed2e39
Several small improvements for release (#159)
daphne-cornelisse Nov 30, 2025
95ceedd
WIP changes (#156)
nadarenator Dec 1, 2025
9d249b9
Releas note
daphne-cornelisse Dec 4, 2025
ff4f00c
Remove magic numbers in `drivenet.h`, set `MAX_AGENTS=32` by default …
daphne-cornelisse Dec 5, 2025
54affb0
Stable: Ensure all tests are passing (#168)
daphne-cornelisse Dec 6, 2025
a03e70a
Add option to zoom in on the map or show full map (#163)
Aditya-Gupta26 Dec 6, 2025
0cf5e3e
Add documentation (#170)
julianh65 Dec 8, 2025
1ce87a2
Add GitHub Actions workflow for docs deployment (#172)
julianh65 Dec 8, 2025
d03a69d
styling fixes (#173)
julianh65 Dec 9, 2025
217cd3b
Add clang format (#132)
aje-valeo Dec 12, 2025
9a4b09a
Add Sanity Command + Maps (#175)
julianh65 Dec 12, 2025
a8bce58
Documentation edits (#176)
daphne-cornelisse Dec 13, 2025
19b5eb6
Early environment resets based on agents' respawn status. (#167)
riccardosavorgnan Dec 13, 2025
43933b2
Speed up end-to-end training: 220K -> 320K on RTX 4080 by reducing # …
daphne-cornelisse Dec 14, 2025
0eeec10
Add pt. (#179)
daphne-cornelisse Dec 14, 2025
6fa0cbb
Docs edits (#178)
daphne-cornelisse Dec 15, 2025
712ac4f
There is a typo in torch.py
WaelDLZ Dec 15, 2025
76dcce1
Merge pull request #181 from Emerge-Lab/wbd/fix_a_typo_in_torchpy
eugenevinitsky Dec 15, 2025
57be883
Use num_maps for eval (#164)
WaelDLZ Dec 16, 2025
fae2b59
Fix small bug in `drive.c` and add binary weights cpt (#184)
daphne-cornelisse Dec 16, 2025
f349b24
Carla junction filter (#187)
mpragnay Dec 17, 2025
4900039
Working Carla Maps (#189)
mpragnay Dec 18, 2025
656d55a
collision fix (#192)
l1onh3art88 Dec 18, 2025
a033669
Fix Ego Speed Calculation (#166)
julianh65 Dec 19, 2025
273d8f2
Small bug fix that makes road edge not appear in agent view for jerk …
daphne-cornelisse Dec 19, 2025
685b3fd
add womd video (#195)
julianh65 Dec 20, 2025
6f0ca30
Add stop/remove collision behavior back (#169)
Aditya-Gupta26 Dec 20, 2025
61911a3
updated docs with multinode training cmd (#174)
mpragnay Dec 20, 2025
45588ca
Carla2d towns (#201)
mpragnay Dec 21, 2025
657281c
initial commit (#204)
julianh65 Dec 22, 2025
c0c5894
Fix goal resampling in Carla maps and make metrics suitable for resam…
daphne-cornelisse Dec 23, 2025
9a58142
Minor correction in resampling code (#183)
WaelDLZ Dec 23, 2025
b6ed82f
Allow human to drive with agents through classic and jerk dynamics mo…
daphne-cornelisse Dec 24, 2025
d4dabdb
Added WOSAC results on the 10k validation dataset (#185)
WaelDLZ Dec 25, 2025
9d723e8
Good behavior with trained policy - resampling.
Dec 26, 2025
95b9da9
Hardcode to 10 max agents for web version.
Dec 26, 2025
cd5243f
Browser demo v1.
Dec 26, 2025
be556c3
More descriptive docs.
Dec 26, 2025
9d60f29
Release post edits.
Dec 26, 2025
7dce5ea
Docs improvements.
Dec 26, 2025
7bd7ee6
Run precommit.
Dec 26, 2025
c516bf4
Better policy.
Dec 26, 2025
02a726a
Revert .ini changes, except one.
Dec 26, 2025
0078856
Delete drive.dSYM/Contents/Info.plist
daphne-cornelisse Dec 26, 2025
dd709c1
Delete pufferlib/resources/drive/puffer_drive_gljhhrl6.bin
daphne-cornelisse Dec 26, 2025
459e875
Drive with agents in browser (#215)
daphne-cornelisse Dec 26, 2025
0b419a1
Merge branch 'main' of https://github.com/Emerge-Lab/PufferDrive into…
Dec 26, 2025
952069d
Fix demo (#217)
daphne-cornelisse Dec 26, 2025
c7419f5
Migrate docs from mkdocs to mdbook
Dec 27, 2025
aba3f47
update pufferdrive doc
Dec 27, 2025
7ca82c2
Do not randomly switch to another agent in FPV. (#219)
daphne-cornelisse Dec 27, 2025
78febfb
make color palette match
Dec 27, 2025
3292815
do not make margins stretch
Dec 27, 2025
9137040
switch bar to gray
Dec 27, 2025
9542dcd
Minor.
Dec 27, 2025
40a0487
Merge branch 'ev/mdbooks' of https://github.com/Emerge-Lab/PufferDriv…
Dec 27, 2025
d90d240
update to push to main docs
Dec 27, 2025
c58e54c
Merge branch 'ev/mdbooks' of github.com:Emerge-Lab/PufferDrive into e…
Dec 27, 2025
51212c1
Merge branch 'main' of github.com:Emerge-Lab/PufferDrive into ev/mdbooks
Dec 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 13 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Defines the code style for C/C++/CUDA section
---
Language: Cpp
BasedOnStyle: LLVM
IndentWidth: 4
TabWidth: 4
UseTab: Never
ColumnLimit: 120
SortIncludes: false
---
Language: Json
# Don't format .json files
DisableFormat: true
2 changes: 2 additions & 0 deletions .clang-format-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Pufferlib extensions
pufferlib/extensions/**
24 changes: 24 additions & 0 deletions .github/workflows/_cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: cleanup

on:
workflow_call:
inputs:
when:
description: "When to clean up (before/after)"
required: false
default: "before"
type: string

jobs:
free-disk:
runs-on: ubuntu-latest
steps:
- name: Free up disk space (${{ inputs.when }})
run: |
echo "Before cleanup:"
df -h
sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/share/boost
sudo apt clean
sudo rm -rf ~/.cache/pip /tmp/* /var/tmp/*
echo "After cleanup:"
df -h
30 changes: 30 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Deploy Docs

on:
push:
branches: [main]
paths: [docs/**]
workflow_dispatch:

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v2
with:
mdbook-version: 'latest'

- name: Build book
run: mdbook build docs

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/book
55 changes: 45 additions & 10 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,34 @@ on:
pull_request:

jobs:
pre-commit:
name: pre-commit
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Run pre-commit on all files
uses: pre-commit/action@v3.0.1
with:
extra_args: --all-files --show-diff-on-failure

test:
name: test ${{ matrix.py }} - ${{ matrix.os }} - ${{ matrix.env }}
needs: pre-commit
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
py:
- "3.11"
- "3.10"
- "3.9"
env:
- pip
- conda
os: [ubuntu-latest, macos-latest]
py: ["3.11", "3.10"]
env: ["pip"]

steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -40,8 +52,31 @@ jobs:
with:
python-version: ${{ matrix.py }}

- name: Check disk space (before cleanup)
if: runner.os == 'Linux'
run: df -h

- name: Free up disk space (Linux only)
if: runner.os == 'Linux'
run: |
echo "Before cleanup:"
df -h
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc
sudo apt-get clean
sudo rm -rf ~/.cache/pip /tmp/* /var/tmp/*
echo "After cleanup:"
df -h

- name: Upgrade pip
run: python -m pip install -U pip

- name: Check disk space (before install)
if: runner.os == 'Linux'
run: df -h

- name: Install pufferlib
run: pip install -e .

- name: Check disk space (after install)
if: runner.os == 'Linux'
run: df -h
43 changes: 43 additions & 0 deletions .github/workflows/perf-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: perf-ci

on:
pull_request:
branches: [ main ]

jobs:
test-performance:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Check disk space (before cleanup)
run: df -h

- name: Free up disk space
run: |
echo "Before cleanup:"
df -h
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc
sudo apt-get clean
sudo rm -rf ~/.cache/pip /tmp/* /var/tmp/*
echo "After cleanup:"
df -h
- name: Install dependencies
run: |
sudo apt update && sudo apt install -y build-essential
python -m pip install -U pip
python -m pip install -e .
python setup.py build_ext --inplace --force
- name: Check disk space (after install)
run: df -h

- name: Test simulator performance
run: python tests/test_simulator_perf.py
timeout-minutes: 20
59 changes: 59 additions & 0 deletions .github/workflows/render-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: render-ci

on:
pull_request:
branches: [ main ]
push:
branches: [ main ]

jobs:
test-render:
name: test-render - ubuntu-latest
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Check disk space (before cleanup)
run: df -h

- name: Free up disk space
run: |
echo "Before cleanup:"
df -h
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc
sudo apt-get clean
sudo rm -rf ~/.cache/pip /tmp/* /var/tmp/*
echo "After cleanup:"
df -h

- name: Install system dependencies for headless rendering
run: |
sudo apt update
sudo apt install -y ffmpeg xvfb build-essential

- name: Upgrade pip
run: python -m pip install -U pip

- name: Install pufferlib
run: |
pip install -e .[cpu] --no-cache-dir
env:
TMPDIR: ${{ runner.temp }}/build
PIP_NO_CACHE_DIR: 1

- name: Compile C extensions
run: python setup.py build_ext --inplace --force

- name: Check disk space (after install)
run: df -h

- name: Run render test
run: python tests/test_drive_render.py
timeout-minutes: 15
48 changes: 48 additions & 0 deletions .github/workflows/train-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: train-ci

on:
pull_request:
branches: [ main ]
push:
branches: [ main ]

jobs:
test-training:
name: test-training
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Check disk space (before cleanup)
run: df -h

- name: Free up disk space
run: |
echo "Before cleanup:"
df -h
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc
sudo apt-get clean
sudo rm -rf ~/.cache/pip /tmp/* /var/tmp/*
echo "After cleanup:"
df -h

- name: Install dependencies
run: |
sudo apt update && sudo apt install -y build-essential
python -m pip install -U pip
pip install -e .
python setup.py build_ext --inplace --force

- name: Check disk space (after install)
run: df -h

- name: Test training
run: python tests/test_drive_train.py
timeout-minutes: 20
55 changes: 55 additions & 0 deletions .github/workflows/utest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Unit tests

on:
pull_request:
branches: [ main ]
push:
branches: [ main ]

jobs:
test:
name: test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Free up disk space
run: |
echo "Before cleanup:"
df -h
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc
sudo apt-get clean
sudo rm -rf ~/.cache/pip /tmp/* /var/tmp/*
echo "After cleanup:"
df -h

- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install -y build-essential cmake

- name: Upgrade pip
run: python -m pip install -U pip

- name: Install pufferlib
run: |
pip install -e .[cpu] --no-cache-dir
env:
TMPDIR: ${{ runner.temp }}/build
PIP_NO_CACHE_DIR: 1

- name: Compile C extensions
run: python setup.py build_ext --inplace --force

- name: Run C ini parsing tests
run: |
chmod +x tests/ini_parser/build_n_test.sh
./tests/ini_parser/build_n_test.sh

- name: Run python ini parsing tests
run: python tests/test_drive_config.py
30 changes: 30 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,40 @@ wandb/
.neptune/
raylib*/
box2d*/
inih*/

# Temp Impulse Wars files
pufferlib/ocean/impulse_wars/*-debug/
pufferlib/ocean/impulse_wars/*-release/
pufferlib/ocean/impulse_wars/debug-*/
pufferlib/ocean/impulse_wars/release-*/
pufferlib/ocean/impulse_wars/benchmark/

# Ignore data files
data/
pufferlib/resources/drive/binaries/
pufferlib/resources/drive/binaries/training/
pufferlib/resources/drive/binaries/validation/

# But keep map_000.bin for the training test
!pufferlib/resources/drive/binaries/map_000.bin
!pufferlib/resources/drive/binaries/training/map_000.bin
pufferlib/resources/drive/sanity/sanity_binaries/

# Compiled drive binary in root
/drive
/visualize
# But allow drive directories
!*/drive/
*.exe
*.out
*.app
artifacts/
pufferlib/resources/drive/output_agent.gif pufferlib/resources/drive/output.gif pufferlib/resources/drive/output_topdown.gif

# Local artifacts and outputs
artifacts/
# Local drive renders
pufferlib/resources/drive/output*.gif
emsdk/
docs/book/
Loading