Skip to content

Commit 06fee74

Browse files
daphne-cornelisseaaravpandyanadarenatorcharliemolonyKKGB
authored
Merge dev into main for release v0.4.0 (#341)
* NYU HPC Greene setup (#316) * Add .env for private variables and update reqs * Add sbatch generation script * Add env templplate * Combine into single sbatch script * Add logs folde * Version changes to make pufferlib compatible * Add jax version * Remove old files * rmv old files * Minor: Fix path * Use typer to override default args using CLI * Add versions * Visualization updates and support to train on fixed dataset size (#317) * Add support for resample_limit * Add option to draw the log replay trajectories in visualizer * WIP * minimal set maps script * minimal set maps script * Data processing utils * Rendering improvements and ppo * Make dataset to resample from configurable * Bug fix: resampling * Agent observation figures * Cleanup * Prep experiments * Prep experiments * Make collision behavior transient (#318) * Make collision behavior transient * Simpler way to reset collision state for collision behavior ignore * Reset info on collision ignore --------- Co-authored-by: Aarav Pandya <[email protected]> * Improved visualizer and gym environment (cloning all tensors) (#320) * Seeds * Improved checkpointing * Scene datta loader * Scene datta loader * Change default config * Add milliseconds in run name for launching many jobs at once * Move exp id creating down * Improved logging * Add LateFusionTransformer network * update default settings * Draw road segments in agent obs plot * Improve checkpointing * Remove dead code * Add info tensor datatype for name-based indexing * Evaluation pipeline * Analysis notebooks * bug fixes * WIP * Separate dataset logic from environment logic * Minor related to training * Make sure to clone every datatype * Eval pipeline updates and video logging * Eval pipeline updates and video logging * Update default constants * Visualizer improvements * Fix reward logging bug: Only increment rewards for living agents * Add shuffle mode * Make collision states for cb ignore transient * More realistic constants * Eval improvements * Add videos * Fix eval pipeline * Minor * Small exp changes * Add remove non-vehicles * Make sure data is repeated if batch_size > dataset size * Align datasets * Minor * Add random baseline policy * Fix bug in eval loop * Small improvements * Small vis improvements and make sure we always clone the tensors * Reset visualizer info when we swap data batches * wip * Improve visualizer and rmv any bugs * Improve visualizer and rmv any bugs * Setting updates for verification * Cleanup * Remove redundant or dead code * Init render storage * Compare obs nb * Ensure full deterministic data loader * Model, various improvements and WIP * Test notebook * Missing function * Add data coverage statistics * Add data coverage statistics * Verify that saved model makes the same mistakes * Make sure we can resample indefenitely during training * Data sampling bug fix: verified that current sampler is deterministic and covers the full dataset * Add gamma as cli arg * Evaluation pipeline improvements * New safe branch * Fix losses averaging bug: account for multiple epochs * Minor * Simplify data sampling logic. * Average performance metrics over K done worlds * Log truncated agents and correct bias in averaging * Put wandb render logic in separate function * Add option to anneal learning rate as cli arg * Bug fix truncations * Delete agents by agent id (#324) * Init * Delete agents * Set default deleted agents idx to -1 * Reset deleted agents in setmaps * Improve evaluation pipeline * Support for using results df to sort scenarios for rendering * Support for using results df to sort scenarios for rendering * Rmv duplicates * Important: Bootstrap rewards if truncated * Comment out bootstrapping for A/B testing * Minor * Visualizer: Always plot time_step if given * Figures for analysis * Ap delete agents (#329) * Init * Delete agents * Set default deleted agents idx to -1 * Reset deleted agents in setmaps --------- Co-authored-by: Aarav Pandya <[email protected]> * Comment out value function bootstrapping * Scene manipulation experiment code * Updated scene manipulation experiment * Minor * Scene Manipulation Plots (#330) * scene manip bar plot * selectively remove controlled/uncontrolled * Small changes to scene manipulation experiment * Only resample if dataset size > batch size * Cach branch (#328) * caching * caching * adding back env_torch * adding back env_torch * adding caching to visualiser * adding caching and cleaning up code * cleaning * Revert "Cach branch (#328)" This reverts commit 5eabb71. * WIP * Merge in mapname tensor * Fix scenario filenames * Revert filename changes * visualize rollout trajectories * Merge map name PR to dc/selfplay (#334) * Add plot expert trajectories (#325) * Add: plot expert trajectories * Refactor: rename draw_only_controllable_veh variable * Export map names * Handle set maps case * Add env helper func to extract filenames from worlds --------- Co-authored-by: Kyungbeom Kim <[email protected]> Co-authored-by: Daphne Cornelisse <[email protected]> * WIP * Revert "Merge map name PR to dc/selfplay (#334)" (#335) This reverts commit 98166f7. * Ap export map name (#337) * Add plot expert trajectories (#325) * Add: plot expert trajectories * Refactor: rename draw_only_controllable_veh variable * Export map names * Handle set maps case * Add env helper func to extract filenames from worlds * Dont use sizeof() for loop indexing --------- Co-authored-by: Kyungbeom Kim <[email protected]> Co-authored-by: Daphne Cornelisse <[email protected]> * WIP * logging and eval improvements * Minor * No time to write good commit * Add support for initialization modes * sbatch * change default color * rollout viz * backward goal experiment * analysis * Minor * Minor * Clean up configs * Dev packaged (#345) * Initial packaging * Initial package rename to separate python and cpp * Refactor python with new gpudrive namespace * Working puffer baseline * Change forgotten instances of gpudrive --> madrona_gpudrive * Delete pygame renderer and package imports * GPUDrive Reqs * Good editable install... madrona doesn't have a build wheel option * Update puffer baseline to latest package * Restructure repo * Clean up root * Minor cleanup * Cleanup readme * Fix path to ppo defaults * Remove layer of depth * Fixes to run SB3 PPO * Update reqs and dockerfile * Working build * Small readme updates * Concise summary of key features * Small fixes to ensure smooth puffer ppo run with rendering * Linting * Update readme * Updated SB3 PPO script * Complete installation instructions * Minor * Fix broken link --------- Co-authored-by: Joseph Suarez <[email protected]> * Update tutorials and clean up dead code (#349) * Docker instructions * Update tutorials * Clean env_torch.py * Minor * Ensure videos are shown in place * Remove dead code * Update readme * fix aspect ratio * Add bibtex * Add citation * PPO loop performance improvements (#351) * Improve settings * Fix upper and lower bounds of gym spaces * Mask before processing observations * Simplify network * Safe * Tested ppo script * Minor readme updates * Minor fix to align data coverage logging * Update paths * colorbar * 3d viz * crosswalk fix * Minor updates to work with new package * Set render=3d to true by default * Add heading angles to 3d boxes * Integrate 3d rendering option with ppo script * viz demo and 2d fix * docstrings * log replay in 3d * Better Dataset Filtering (#339) * Add plot expert trajectories (#325) * Add: plot expert trajectories * Refactor: rename draw_only_controllable_veh variable * filter 3d scenes * better processing script > less unsolvable agents * updated viz notebook * filter more 3d structures * analyze reverse/u-turns * post-processing --------- Co-authored-by: Kyungbeom Kim <[email protected]> * Minor readme edits and tutorial fixes * Fix broken links --------- Co-authored-by: Daphne Cornelisse <[email protected]> Co-authored-by: Aarav Pandya <[email protected]> Co-authored-by: Kevin <[email protected]> Co-authored-by: charliemolony <[email protected]> Co-authored-by: Kyungbeom Kim <[email protected]> Co-authored-by: Joseph Suarez <[email protected]>
1 parent 8edd65b commit 06fee74

File tree

172 files changed

+19575
-221917
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+19575
-221917
lines changed

Diff for: .gitignore

+23-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
.vscode/settings.json
1010
.vscode/tasks.json
1111
/examples/benchmarks/results/
12-
/baselines/ippo/logs/*
12+
/baselines/ppo/logs/*
1313
*.sif
1414
/cloudpickle
1515
/cloudpickle-3.0.0.dist-info
@@ -18,14 +18,17 @@
1818
/zipp*
1919
.python-version
2020
/google-cloud-sdk/*
21+
*.gz
2122

2223
# Data
2324
hpc/overlay*
2425
data/raw/*
2526
data/processed/validation/*
2627
data/processed/testing/*
2728
data/processed/training/*
28-
data/formatted_json_v2_no_tl_valid/*
29+
data/processed/sampled/*
30+
data/processed/hand_designed/*
31+
analyze/figures/*
2932

3033
# Logging
3134
/wandb
@@ -189,7 +192,6 @@ celerybeat.pid
189192
*.sage.py
190193

191194
# Environments
192-
.env
193195
.venv
194196
venv/
195197
ENV/
@@ -239,4 +241,22 @@ pyrightconfig.json
239241

240242
*~
241243

244+
# Environment variables
245+
# To be manually created using .env.template
246+
.env
247+
248+
# Logs
249+
examples/experimental/logs/*
250+
251+
# Sbatch scripts
252+
*.sh
253+
254+
# Videos
255+
videos/
256+
output_videos_larger_dataset/
257+
output_videos_small_dataset/
258+
259+
# Trained models
260+
models/
261+
242262
# End of https://www.toptal.com/developers/gitignore/api/python,c++

Diff for: CONTRIBUTING.md

-95
This file was deleted.

Diff for: Dockerfile

+25-35
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
1-
# Base image with CUDA and cuDNN support
1+
# Base image with CUDA and cuDNN support
22
FROM nvidia/cuda:12.2.2-cudnn8-devel-ubuntu22.04
33

4-
ARG USER_ID=1000
5-
ARG GROUP_ID=1000
6-
7-
# Create a user with the specified UID and GID
8-
RUN groupadd -g ${GROUP_ID} gpudrive_group && \
9-
useradd -m -u ${USER_ID} -g gpudrive_group -s /bin/bash gpudrive_user
4+
ARG DEBIAN_FRONTEND=noninteractive
105

116
# Install essential packages
127
RUN apt-get update && apt-get install -y --no-install-recommends \
8+
software-properties-common \
139
build-essential \
1410
cmake \
1511
git \
@@ -29,38 +25,32 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
2925
openssh-client && \
3026
rm -rf /var/lib/apt/lists/*
3127

32-
# Install Miniforge for Conda into /opt/miniforge3
33-
RUN wget --no-check-certificate https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh && \
34-
bash Miniforge3-Linux-x86_64.sh -b -p /opt/miniforge3 && \
35-
rm Miniforge3-Linux-x86_64.sh
36-
37-
# Set up environment variables for Conda
38-
RUN echo "#!/bin/bash\n\
39-
unset -f which\n\
40-
source /opt/miniforge3/etc/profile.d/conda.sh\n\
41-
export PATH=/opt/miniforge3/bin:\$PATH\n\
42-
export PYTHONPATH=/opt/miniforge3/bin:\$PYTHONPATH" > /opt/env.sh
28+
# Install Python 3.11
29+
RUN apt-add-repository -y ppa:deadsnakes/ppa \
30+
&& apt-get install -y python3.11 python3.11-dev python3.11-distutils
4331

44-
# Clone the gpudrive repository
45-
RUN git clone --recursive https://github.com/Emerge-Lab/gpudrive.git
46-
47-
# Set the working directory
48-
WORKDIR /gpudrive
32+
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.11
4933

50-
RUN git fetch --all && git checkout main
34+
# Set Python 3.11 as default
35+
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 11 && \
36+
update-alternatives --install /usr/bin/python python /usr/bin/python3.11 11
5137

52-
# Ensure Conda is available and create the environment
53-
SHELL ["/bin/bash", "-c"] # Use bash shell for running conda commands
54-
RUN source /opt/env.sh && conda env create -f environment.yml
38+
RUN apt-get remove -y cmake && pip3 install --upgrade cmake
5539

56-
# Activate the environment and install project dependencies using Poetry
57-
RUN echo "source /opt/env.sh && conda activate gpudrive" >> ~/.bashrc
58-
59-
RUN source /opt/env.sh && conda activate gpudrive
40+
# Clone the gpudrive repository
41+
RUN git clone --recursive https://github.com/Emerge-Lab/gpudrive.git --branch dev-packaged
42+
ENV MADRONA_MWGPU_KERNEL_CACHE=./gpudrive_cache
6043

61-
# Automatically start in the /gpudrive directory and activate the conda environment
62-
CMD ["bash", "-c", "source /opt/env.sh && conda activate gpudrive && cd /gpudrive && exec bash"]
44+
WORKDIR /gpudrive
45+
RUN mkdir build
46+
WORKDIR /gpudrive/build
47+
RUN cmake .. -DCMAKE_BUILD_TYPE=Release
48+
RUN ln -s /usr/local/cuda/lib64/stubs/libcuda.so /usr/local/cuda/lib64/stubs/libcuda.so.1
49+
RUN LD_LIBRARY_PATH=/usr/local/cuda/lib64/stubs/:$LD_LIBRARY_PATH make -j
50+
RUN rm /usr/local/cuda/lib64/stubs/libcuda.so.1
51+
WORKDIR /gpudrive
6352

64-
USER gpudrive_user
53+
RUN pip3 install -e .[pufferlib]
6554

66-
LABEL org.opencontainers.image.source https://github.com/Emerge-Lab/gpudrive
55+
CMD ["/bin/bash"]
56+
LABEL org.opencontainers.image.source=https://github.com/Emerge-Lab/gpudrive

0 commit comments

Comments
 (0)