Skip to content

Conversation

@EllingtonKirby
Copy link
Collaborator

Linked to #406

Incorporates the missing changes, then adds a commit at the end to handle the new TL states.

NOTE: To make the merge conflict easier to handle, I skipped all changes to json_serialization.hpp since April 23ish, then re-implemented them in the new format.

Double Note: This code will not run with a continuous action space as that function is missing in the torch env

daphne-cornelisse and others added 30 commits April 28, 2025 09:47
* Update settings

* Add warning to catch unnormalized features

* Clean done logic.

* Restructure expert suggestions under _guidance_

* Update settings

* Add warning to catch unnormalized features

* Clean done logic.

* Restructure expert suggestions under _guidance_

* Update WOSAC eval readme

* Provide agents with full speed guidance trajs

* Add support for headings

* Add vel_xy

* Improve code efficiency

* Small shape bug fix

* Improve wosac eval setting

* Update best 1-scene policy

* Refactor gym env with unified guidance mode.

* Update visualizer with unified plotting of reference traj

* Minor

* Transform reference headings to local coordinate frame.

* Give value network a bit more capacity

* Give value network a bit more capacity

* Add dataframe code

* Minor

* Add optional video logging to wosac script

* Update init mode

* Visualizer bug fix

* Minor

* wosac eval updates and new cpts
* detect parked script

* default arg change

* parked vehicle mask

* train and eval init modes

* Minor fixes

---------

Co-authored-by: kevin <kevinwinston184@gmail.com>
* Improve agent pov plotting utils

* Delete old unused function

* Fix

* Add lidar obs option to plot agent observation

* wip

* Revert defaults
* Delete obsolete vbd functions

* Format

* Remove all instances of use_vbd and alike -> unified guidance mode

* Create dataclass struct for VBD online predictionsions

* Delete world_time_steps as it is no longer used

* Leaving a todo

* Make sure to demean the VBD predicted trajectories

* Data analysis and minor changes

* Guidance data analysis notebook

* Script to process guidance data

* Fixes

* Fixes

* Update nb

* Fixes and make sure to always wrap the yaws.

* Fixes and make sure to always wrap the yaws.

* Example data to work with
…Emerge-Lab#427)

* Intended usage for z-axis

* Access average z pos (elevation) from logs

* Fix intended usage of avg_z

* fixes

* z pos fixes

* Fix bug by converting all vals in tensor to floats

* remove print statement

* Cleanup

---------

Co-authored-by: kevin <kevinwinston184@gmail.com>
* Small improvements

* Minor training improvements

* Rebase over dev

* Bookkeeping

* Bookkeeping

* Small fixes for gpu

* wip: config

* Make adding the action optional

* wip

* Analysis notebooks

* WIP: new reward mode

* Frequency

* Make sure to normalize rewards and other changes

* Minor

* Update model

* Add bonus at end of episode mechanism

* Fixes

* Improve renderer

* Rmv one-hot encoding

* Fix render

* Adding back the whole shazam

* Naming stuff

* Add data folder as cmdline arg

* Add data folder as cmdline arg

* Minor bug fixes

* Cleanup and better error message

* Align reward components scale
* model looks kinda okay?

* think we added the steer angle correctly to the env

* Small bug fix

---------

Co-authored-by: Daphne Cornelisse <cor.daphne@gmail.com>
* add support for model switching

* remove memory pinning

* revert changed values
…ge-Lab#435)

* Bug fix: Ensure there is always a warmup period of at least 10 steps when using vbd_online

* online guidance fixes

* minor fix

* changes to get 91 steps

* Keep episodeLen at 90, and don't use it toread in the logs

* Add back warnings / idiot proofing

* tiny fix

* fix online guidance

* Set max agents to 32

---------

Co-authored-by: kevin <kevinwinston184@gmail.com>
* Small improvements

* Minor training improvements

* Rebase over dev

* Bookkeeping

* Bookkeeping

* Small fixes for gpu

* wip: config

* Make adding the action optional

* wip

* Analysis notebooks

* WIP: new reward mode

* Frequency

* Make sure to normalize rewards and other changes

* Minor

* Update model

* Add bonus at end of episode mechanism

* Fixes

* Improve renderer

* Rmv one-hot encoding

* Fix render

* Adding back the whole shazam

* Naming stuff

* Add data folder as cmdline arg

* Add data folder as cmdline arg

* Minor bug fixes

* Cleanup and better error message

* Align reward components scale

* Push models

* Viz improvements

* Data analysis

* Add guidance dropout mask

* Add dropout as option for training

* Add dropout as option for training

* Bug fix: only count valid points

* Increase network size to 200K params

* Bug fix

* Larger net

* Set controlled agent default to 32

* Minor improvements

* WIP

* Make agents their original size

* Minor

* Remove collision state from ego

* Plotting stuff

* wip

* More plotting stuff

* Minor

* Fixes

* Reward improvements

* Reward improvements

* Give agent a bit more road graph information

* Visualizer bug fix: clean up axis before generating new plot

* Formatting

* Change dropout mechanism such that dguidance_dropout_prob represents the maximum dropout probability [cover wide range].

* Add mechanism to discourage agents from turning around for bonus

* Fix sbatch generation script

* Add speed penalty if end of traj is reached

* wip

* Some eval fixes

* Eval wip

* Fix action space bug

* Fix defaults

* VBD amortize shape bug fix

* rmv speed penalty

* Settings

* Fig

* huh?

* Replace end of route bonus with small jerk penalty

* Many improvements

* Exclude data

* Delete checkpoints

* Minor
* Fix: ensure vbd_online can be used on cuda and cpu.

* Small updates

* WOSAC defaults

* Dynamics model fix

* Minor
* dataset script

* wosac dataset script

* parallelized wosac script

* pkl support

* vbd cuda

---------
* Fix: ensure vbd_online can be used on cuda and cpu.

* Small updates

* WOSAC defaults

* Dynamics model fix

* Minor

* Update sbatch

* Code to make latex wosac tables

* pkl file

* Add smoothness

* Add new dropout mode

* WOSAC eval improvements

* Add figures

* Increment progress based on visible route points only.

* Files

* Some small updates
* Fix: ensure vbd_online can be used on cuda and cpu.

* Small updates

* WOSAC defaults

* Dynamics model fix

* Minor

* Update sbatch

* Code to make latex wosac tables

* pkl file

* Add smoothness

* Add new dropout mode

* WOSAC eval improvements

* Add figures

* Increment progress based on visible route points only.

* Files

* Some small updates

* Minor

* WOSAC eval
)

Co-authored-by: Pragnay Mandavilli <pm3881@ga014.hpc.nyu.edu>
* Testing agent type in obs

* Implement type-aware action space

* Remove padding agent

* Cleanup

* Comment out cone view line for now

* Update angle ranges
* fix empty geometry handling and out of bounds indices

* add safer access and overflow prevention

* allow flexible no of elements
rjs02 and others added 12 commits June 7, 2025 01:24
…nfig

Fix: pass config parameters into EnvConfig object in PufferEnv
* Add tl_states to extraction script.

* WIP

* Add back metadata

* Add tl_states struct and access through simulator.

* Add time index

* Cleanup

* Cleanup

* SMall fix

* Add tl state data struct

* Add minimum test script

* Add minimum test script

* [Work In progress] Fixed initialization and made TL a singleton tensor

* Fix json init and export

* mean centering

* Test and omit unnesecessary code in tl obs

* Changed data access format in python code

* Added a more interpretable positional element arrays

* Unpack tl_states correctly

* Add tl state plotting function in visualizer

* mini bug

* Fix traffic lights by exporting everything as float32

* Improve colors

* Remove test file

---------

Co-authored-by: Aarav Pandya <ap7641@nyu.edu>
Co-authored-by: Eugene Vinitsky <eugenevinitsky@users.noreply.github.com>
Co-authored-by: Pragnay Mandavilli <pm3881@ga034.hpc.nyu.edu>
Co-authored-by: Pragnay Mandavilli <pm3881@ga014.hpc.nyu.edu>
@daphne-cornelisse
Copy link
Contributor

Thank you @EllingtonKirby ! I am excited about the training speeds ups enabled by this

To confirm: is this a replacement for the PR you link?

@EllingtonKirby
Copy link
Collaborator Author

It is not a replacement, it will merge into @aaravpandya 's PR #406 . This PR just fixes the merge conflicts and adds support for the Traffic Light states and a few other small changes, to his larger work

@daphne-cornelisse
Copy link
Contributor

LGTM

@daphne-cornelisse daphne-cornelisse merged commit f188033 into Emerge-Lab:ap_simdJson Jun 20, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants